public class BeanInjectionTarget<T> extends BasicInjectionTarget<T>
beanManager| Constructor and Description |
|---|
BeanInjectionTarget(EnhancedAnnotatedType<T> type,
Bean<T> bean,
BeanManagerImpl beanManager) |
BeanInjectionTarget(EnhancedAnnotatedType<T> type,
Bean<T> bean,
BeanManagerImpl beanManager,
Injector<T> injector,
LifecycleCallbackInvoker<T> invoker) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkDecoratedMethods(EnhancedAnnotatedType<T> type,
List<Decorator<?>> decorators) |
protected void |
checkNoArgsConstructor(EnhancedAnnotatedType<T> type) |
static <T> BeanInjectionTarget<T> |
createDefault(EnhancedAnnotatedType<T> type,
Bean<T> bean,
BeanManagerImpl beanManager) |
void |
dispose(T instance)
Destroys the instance.
|
static <T> BeanInjectionTarget<T> |
forCdiInterceptor(EnhancedAnnotatedType<T> type,
Bean<T> bean,
BeanManagerImpl manager) |
Bean<T> |
getBean()
Returns a
Bean this producer is associated with or null if no such bean exists. |
void |
initializeAfterBeanDiscovery(EnhancedAnnotatedType<T> annotatedType) |
protected void |
initializeInterceptionModel(EnhancedAnnotatedType<T> annotatedType) |
protected boolean |
isDecorator() |
protected boolean |
isInterceptionCandidate() |
protected boolean |
isInterceptor() |
void |
postConstruct(T instance)
Calls the
PostConstruct callback, if it exists, according to the semantics required by the Java
EE platform specification. |
void |
preDestroy(T instance)
Calls the
PreDestroy callback, if it exists, according to the semantics required by the Java EE
platform specification. |
T |
produce(CreationalContext<T> ctx)
Causes an instance to be produced via the
Producer. |
protected void |
setupConstructorInterceptionInstantiator(InterceptionModel interceptionModel) |
checkType, create, createNonCdiInterceptor, getAnnotated, getAnnotatedType, getBeanManager, getInjectionPoints, getInjector, getInstantiator, getLifecycleCallbackInvoker, getType, hasDecorators, hasInterceptors, initInstantiator, inject, setInstantiator, toStringcheckDelegateInjectionPoints, equals, hashCodepublic BeanInjectionTarget(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager, Injector<T> injector, LifecycleCallbackInvoker<T> invoker)
public BeanInjectionTarget(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager)
public static <T> BeanInjectionTarget<T> createDefault(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager)
public static <T> BeanInjectionTarget<T> forCdiInterceptor(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl manager)
public void postConstruct(T instance)
InjectionTarget
Calls the PostConstruct callback, if it exists, according to the semantics required by the Java
EE platform specification.
postConstruct in interface InjectionTarget<T>postConstruct in class BasicInjectionTarget<T>instance - The instance on which to invoke the PostConstruct methodpublic void preDestroy(T instance)
InjectionTarget
Calls the PreDestroy callback, if it exists, according to the semantics required by the Java EE
platform specification.
preDestroy in interface InjectionTarget<T>preDestroy in class BasicInjectionTarget<T>instance - The instance on which to invoke the PreDestroy methodpublic void dispose(T instance)
ProducerDestroys the instance.
If the Producer represents a class, then this operation does nothing.
If the Producer represents a producer field or method, this calls the disposer method, if any, on a contextual
instance of the bean that declares the disposer method or performs any additional required cleanup, if any, to destroy
state associated with a resource.
protected boolean isInterceptor()
protected boolean isDecorator()
protected boolean isInterceptionCandidate()
protected void initializeInterceptionModel(EnhancedAnnotatedType<T> annotatedType)
public void initializeAfterBeanDiscovery(EnhancedAnnotatedType<T> annotatedType)
initializeAfterBeanDiscovery in class BasicInjectionTarget<T>protected void setupConstructorInterceptionInstantiator(InterceptionModel interceptionModel)
protected void checkNoArgsConstructor(EnhancedAnnotatedType<T> type)
protected void checkDecoratedMethods(EnhancedAnnotatedType<T> type, List<Decorator<?>> decorators)
public T produce(CreationalContext<T> ctx)
Producer
Causes an instance to be produced via the Producer.
If the Producer represents a class, this will invoke the constructor annotated Inject if it
exists, or the constructor with no parameters otherwise. If the class has interceptors, produce() is responsible
for building the interceptors and decorators of the instance.
If the Producer represents a producer field or method, this will invoke the producer method on, or access the
producer field of, a contextual instance of the bean that declares the producer.
produce in interface Producer<T>produce in class BasicInjectionTarget<T>ctx - The CreationalContext to use for the produced objectpublic Bean<T> getBean()
AbstractProducerBean this producer is associated with or null if no such bean exists.getBean in class BasicInjectionTarget<T>Copyright © 2014 Seam Framework. All Rights Reserved.