public class BasicInjectionTarget<T> extends AbstractProducer<T> implements org.jboss.weld.manager.api.WeldInjectionTarget<T>
InjectionTarget implementation. The implementation supports:
| Modifier and Type | Field and Description |
|---|---|
protected BeanManagerImpl |
beanManager |
| Modifier | Constructor and Description |
|---|---|
protected |
BasicInjectionTarget(EnhancedAnnotatedType<T> type,
javax.enterprise.inject.spi.Bean<T> bean,
BeanManagerImpl beanManager,
Injector<T> injector,
LifecycleCallbackInvoker<T> invoker) |
protected |
BasicInjectionTarget(EnhancedAnnotatedType<T> type,
javax.enterprise.inject.spi.Bean<T> bean,
BeanManagerImpl beanManager,
Injector<T> injector,
LifecycleCallbackInvoker<T> invoker,
Instantiator<T> instantiator) |
protected |
BasicInjectionTarget(EnhancedAnnotatedType<T> type,
javax.enterprise.inject.spi.Bean<T> bean,
BeanManagerImpl beanManager,
Instantiator<T> instantiator) |
| Modifier and Type | Method and Description |
|---|---|
static <T> BasicInjectionTarget<T> |
create(EnhancedAnnotatedType<T> type,
javax.enterprise.inject.spi.Bean<T> bean,
BeanManagerImpl beanManager,
Injector<T> injector,
LifecycleCallbackInvoker<T> invoker) |
static <T> BasicInjectionTarget<T> |
createDefault(EnhancedAnnotatedType<T> type,
javax.enterprise.inject.spi.Bean<T> bean,
BeanManagerImpl beanManager,
Instantiator<T> instantiator) |
static <T> BasicInjectionTarget<T> |
createNonCdiInterceptor(EnhancedAnnotatedType<T> type,
BeanManagerImpl beanManager)
Creates
InjectionTarget for interceptors which do not have associated Interceptor. |
void |
dispose(T instance) |
javax.enterprise.inject.spi.AnnotatedType<T> |
getAnnotated() |
javax.enterprise.inject.spi.AnnotatedType<T> |
getAnnotatedType() |
javax.enterprise.inject.spi.Bean<T> |
getBean()
Returns a
Bean this producer is associated with or null if no such bean exists. |
BeanManagerImpl |
getBeanManager() |
Set<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoints() |
Injector<T> |
getInjector() |
Instantiator<T> |
getInstantiator() |
LifecycleCallbackInvoker<T> |
getLifecycleCallbackInvoker() |
protected SlimAnnotatedType<T> |
getType() |
boolean |
hasDecorators() |
boolean |
hasInterceptors() |
protected void |
checkType(EnhancedAnnotatedType<T> type) |
protected void |
initializeAfterBeanDiscovery(EnhancedAnnotatedType<T> annotatedType) |
protected Instantiator<T> |
initInstantiator(EnhancedAnnotatedType<T> type,
javax.enterprise.inject.spi.Bean<T> bean,
BeanManagerImpl beanManager,
Set<javax.enterprise.inject.spi.InjectionPoint> injectionPoints)
Returns an instantiator that will be used to create a new instance of a given component.
|
void |
inject(T instance,
javax.enterprise.context.spi.CreationalContext<T> ctx) |
void |
postConstruct(T instance) |
void |
preDestroy(T instance) |
T |
produce(javax.enterprise.context.spi.CreationalContext<T> ctx) |
void |
setInstantiator(Instantiator<T> instantiator) |
String |
toString() |
equals, hashCode, checkDelegateInjectionPointsprotected final BeanManagerImpl beanManager
protected BasicInjectionTarget(EnhancedAnnotatedType<T> type, javax.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager, Injector<T> injector, LifecycleCallbackInvoker<T> invoker)
protected BasicInjectionTarget(EnhancedAnnotatedType<T> type, javax.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager, Injector<T> injector, LifecycleCallbackInvoker<T> invoker, Instantiator<T> instantiator)
protected BasicInjectionTarget(EnhancedAnnotatedType<T> type, javax.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager, Instantiator<T> instantiator)
public static <T> BasicInjectionTarget<T> create(EnhancedAnnotatedType<T> type, javax.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager, Injector<T> injector, LifecycleCallbackInvoker<T> invoker)
public static <T> BasicInjectionTarget<T> createDefault(EnhancedAnnotatedType<T> type, javax.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager, Instantiator<T> instantiator)
public static <T> BasicInjectionTarget<T> createNonCdiInterceptor(EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager)
InjectionTarget for interceptors which do not have associated Interceptor. These interceptors are a
result of using Interceptors annotation directly on the target class.protected void checkType(EnhancedAnnotatedType<T> type)
public T produce(javax.enterprise.context.spi.CreationalContext<T> ctx)
produce in interface javax.enterprise.inject.spi.Producer<T>public void inject(T instance, javax.enterprise.context.spi.CreationalContext<T> ctx)
inject in interface javax.enterprise.inject.spi.InjectionTarget<T>public void postConstruct(T instance)
postConstruct in interface javax.enterprise.inject.spi.InjectionTarget<T>public void preDestroy(T instance)
preDestroy in interface javax.enterprise.inject.spi.InjectionTarget<T>public void dispose(T instance)
dispose in interface javax.enterprise.inject.spi.Producer<T>public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
getInjectionPoints in interface javax.enterprise.inject.spi.Producer<T>protected SlimAnnotatedType<T> getType()
public BeanManagerImpl getBeanManager()
public Instantiator<T> getInstantiator()
public void setInstantiator(Instantiator<T> instantiator)
public boolean hasInterceptors()
public boolean hasDecorators()
protected void initializeAfterBeanDiscovery(EnhancedAnnotatedType<T> annotatedType)
protected Instantiator<T> initInstantiator(EnhancedAnnotatedType<T> type, javax.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager, Set<javax.enterprise.inject.spi.InjectionPoint> injectionPoints)
initInstantiator(EnhancedAnnotatedType, Bean, BeanManagerImpl, Set) method is supposed to register all these
injection points within the injectionPoints set passed in as a parameter.public javax.enterprise.inject.spi.AnnotatedType<T> getAnnotated()
getAnnotated in class AbstractProducer<T>public javax.enterprise.inject.spi.AnnotatedType<T> getAnnotatedType()
getAnnotatedType in interface org.jboss.weld.manager.api.WeldInjectionTarget<T>public LifecycleCallbackInvoker<T> getLifecycleCallbackInvoker()
public javax.enterprise.inject.spi.Bean<T> getBean()
AbstractProducerBean this producer is associated with or null if no such bean exists.getBean in class AbstractProducer<T>Copyright © 2017. All rights reserved.