public static <T> EnhancedAnnotatedType<T> createEnhancedAnnotatedType(BasicInjectionTarget<T> it) { return EnhancedAnnotatedTypeImpl.of( (SlimAnnotatedType<T>) it.getAnnotatedType(), ClassTransformer.instance(it.getBeanManager())); }
.getDeclaredEnhancedConstructor(new ConstructorSignatureImpl(analyzer.getConstructor()));
/** * Gets the implementing class * * @return The class */ public Class<? extends T> getAnnotatedClass() { return getJavaClass(); }
/** * Gets the property name * * @return The property name * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedField#getName() */ public String getPropertyName() { return getName(); }
protected void processMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Collection<Annotation> annotations, ClassTransformer classTransformer, boolean declared) { for (Annotation annotation : annotations) { processMetaAnnotations(metaAnnotationMap, annotation, classTransformer, declared); } }
private static EnhancedAnnotatedType<?> createAnnotatedTypeForExistingBeanClass(String bdaId, Bean<?> bean) { ClassTransformer classTransformer = getClassTransformer(); SlimAnnotatedType<?> annotatedType = classTransformer.getBackedAnnotatedType(bean.getBeanClass(), bdaId); return EnhancedAnnotatedTypeImpl.of(annotatedType, classTransformer); }
/** * Gets the delegate (class) * * @return The class */ @Override public Class<T> getDelegate() { return getJavaClass(); }
/** * Gets the property name * * @return The property name * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedField#getName() */ public String getPropertyName() { return getName(); }
protected void processMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Collection<Annotation> annotations, ClassTransformer classTransformer, boolean declared) { for (Annotation annotation : annotations) { processMetaAnnotations(metaAnnotationMap, annotation, classTransformer, declared); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) private static void doDefineNewManagedBean(BeanManagerImpl beanManager, String bdaId, Class<?> beanClass) { try { ClassTransformer classTransformer = getClassTransformer(); SlimAnnotatedType<?> annotatedType = classTransformer.getBackedAnnotatedType(beanClass, bdaId); boolean managedBeanOrDecorator = Beans.isTypeManagedBeanOrDecoratorOrInterceptor(annotatedType); if (managedBeanOrDecorator) { EnhancedAnnotatedType eat = EnhancedAnnotatedTypeImpl.of(annotatedType, classTransformer); BeanAttributes attributes = BeanAttributesFactory.forBean(eat, beanManager); ManagedBean<?> bean = ManagedBean.of(attributes, eat, beanManager); ReflectionHelper.set(beanManager, beanManager.getClass(), "beanSet", Collections.synchronizedSet(new HashSet<Bean<?>>())); beanManager.addBean(bean); beanManager.getBeanResolver().clear(); bean.initializeAfterBeanDiscovery(); LOGGER.debug("Bean defined '{}'", beanClass.getName()); } else { // TODO : define session bean LOGGER.warning("Bean NOT? defined '{}', session bean?", beanClass.getName()); } } catch (Exception e) { LOGGER.debug("Bean definition failed.", e); } }
/** * Gets the delegate (class) * * @return The class */ @Override public Class<T> getDelegate() { return getJavaClass(); }
/** * Gets the property name * * @return The property name * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedField#getName() */ public String getPropertyName() { return getName(); }
protected void processMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation[] annotations, ClassTransformer classTransformer, boolean declared) { for (Annotation annotation : annotations) { processMetaAnnotations(metaAnnotationMap, annotation, classTransformer, declared); } }
@Override public EnhancedAnnotatedType<?> apply(SlimAnnotatedType<?> annotatedType) { return EnhancedAnnotatedTypeImpl.of(annotatedType, ClassTransformer.this); } }
/** * Gets the implementing class * * @return The class */ public Class<? extends T> getAnnotatedClass() { return getJavaClass(); }
@Override public EnhancedAnnotatedType<?> apply(SlimAnnotatedType<?> annotatedType) { return EnhancedAnnotatedTypeImpl.of(annotatedType, ClassTransformer.this); } }
/** * Gets the implementing class * * @return The class */ public Class<? extends T> getAnnotatedClass() { return getJavaClass(); }
@Override public EnhancedAnnotatedType<?> apply(SlimAnnotatedType<?> annotatedType) { return EnhancedAnnotatedTypeImpl.of(annotatedType, ClassTransformer.this); } }
/** * Gets the implementing class * * @return The class */ public Class<? extends T> getAnnotatedClass() { return getJavaClass(); }
@Override public EnhancedAnnotatedType<?> apply(SlimAnnotatedType<?> annotatedType) { return EnhancedAnnotatedTypeImpl.of(annotatedType, ClassTransformer.this); } }