T - enum typepublic class EnumInjectionTarget<T extends Enum<?>> extends DefaultInjectionTarget<T>
InjectionTarget implementation capable of injecting Java enums.beanManager| Constructor and Description |
|---|
EnumInjectionTarget(EnhancedAnnotatedType<T> type,
BeanManagerImpl beanManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkType(EnhancedAnnotatedType<T> type) |
protected void |
disinject(Set<? extends WeldInjectionPoint<?,?>> injectionPoints,
T instance)
Sets injected values back to null.
|
protected void |
disinject(WeldInjectionPoint<?,?> wip,
T instance) |
void |
dispose(T instance)
Destroys the instance.
|
protected Instantiator<T> |
initInstantiator(EnhancedAnnotatedType<T> type,
Bean<T> bean,
BeanManagerImpl beanManager,
Set<InjectionPoint> injectionPoints)
Returns an instantiator that will be used to create a new instance of a given component.
|
static <T extends Enum<?>> |
of(EnhancedAnnotatedType<T> clazz,
BeanManagerImpl manager) |
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. |
String |
toString() |
getResourceInjectionPoints, initializeAfterBeanDiscovery, injectcheckDecoratedMethods, getAnnotated, getBean, getBeanManager, getInitializerMethods, getInjectableFields, getInjectionPoints, getInstantiator, getPostConstructMethods, getPreDestroyMethods, getType, hasDecorators, hasInterceptors, isDecorator, isInterceptionCandidate, isInterceptor, setInstantiatorcheckDelegateInjectionPoints, equals, hashCodepublic EnumInjectionTarget(EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager)
public static <T extends Enum<?>> EnumInjectionTarget<T> of(EnhancedAnnotatedType<T> clazz, BeanManagerImpl manager)
protected Instantiator<T> initInstantiator(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager, Set<InjectionPoint> injectionPoints)
AbstractInjectionTargetAbstractInjectionTarget.initInstantiator(EnhancedAnnotatedType, Bean, BeanManagerImpl, Set) method is supposed to register all these
injection points within the injectionPoints set passed in as a parameter.initInstantiator in class DefaultInjectionTarget<T extends Enum<?>>protected void checkType(EnhancedAnnotatedType<T> type)
checkType in class AbstractInjectionTarget<T extends Enum<?>>public 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 void disinject(Set<? extends WeldInjectionPoint<?,?>> injectionPoints, T instance)
protected void disinject(WeldInjectionPoint<?,?> wip, T instance)
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 extends Enum<?>>produce in class AbstractInjectionTarget<T extends Enum<?>>ctx - The CreationalContext to use for the produced objectpublic 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 extends Enum<?>>postConstruct in class DefaultInjectionTarget<T extends Enum<?>>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 extends Enum<?>>preDestroy in class DefaultInjectionTarget<T extends Enum<?>>instance - The instance on which to invoke the PreDestroy methodpublic String toString()
toString in class AbstractInjectionTarget<T extends Enum<?>>Copyright © 2012 Seam Framework. All Rights Reserved.