Class AfterTypeDiscoveryImpl
- java.lang.Object
-
- org.jboss.weld.bootstrap.events.ContainerEvent
-
- org.jboss.weld.bootstrap.events.AbstractContainerEvent
-
- org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent
-
- org.jboss.weld.bootstrap.events.AbstractBeanDiscoveryEvent
-
- org.jboss.weld.bootstrap.events.AbstractAnnotatedTypeRegisteringEvent
-
- org.jboss.weld.bootstrap.events.AfterTypeDiscoveryImpl
-
- All Implemented Interfaces:
AfterTypeDiscovery,NotificationListener
public class AfterTypeDiscoveryImpl extends AbstractAnnotatedTypeRegisteringEvent implements AfterTypeDiscovery
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.weld.bootstrap.events.AbstractAnnotatedTypeRegisteringEvent
AbstractAnnotatedTypeRegisteringEvent.AnnotatedTypeRegistration<T>
-
-
Field Summary
-
Fields inherited from class org.jboss.weld.bootstrap.events.AbstractAnnotatedTypeRegisteringEvent
additionalAnnotatedTypes
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAfterTypeDiscoveryImpl(BeanManagerImpl beanManager, BeanDeploymentArchiveMapping bdaMapping, org.jboss.weld.bootstrap.spi.Deployment deployment, Collection<ContextHolder<? extends Context>> contexts)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> AnnotatedTypeConfigurator<T>addAnnotatedType(Class<T> type, String id)Obtains a newAnnotatedTypeConfiguratorto configure a newAnnotatedTypeand add it to the set of types which will be scanned during bean discovery at the end of the observer invocation.voidaddAnnotatedType(AnnotatedType<?> type, String id)Adds a givenAnnotatedTypeto the set of types which will be scanned during bean discovery.static voidfire(BeanManagerImpl beanManager, org.jboss.weld.bootstrap.spi.Deployment deployment, BeanDeploymentArchiveMapping bdaMapping, Collection<ContextHolder<? extends Context>> contexts)List<Class<?>>getAlternatives()List<Class<?>>getDecorators()List<Class<?>>getInterceptors()protected voidstoreSyntheticAnnotatedType(BeanDeployment deployment, AnnotatedType<?> type, String id)-
Methods inherited from class org.jboss.weld.bootstrap.events.AbstractAnnotatedTypeRegisteringEvent
addSyntheticAnnotatedType, finish
-
Methods inherited from class org.jboss.weld.bootstrap.events.AbstractBeanDiscoveryEvent
getBeanDeployments, getContexts, getDeployment, getOrCreateBeanDeployment, getTypeStore
-
Methods inherited from class org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent
addDefinitionError, fire
-
Methods inherited from class org.jboss.weld.bootstrap.events.AbstractContainerEvent
getActualTypeArguments, getBeanManager, getErrors, getEventType, getRawType
-
Methods inherited from class org.jboss.weld.bootstrap.events.ContainerEvent
checkWithinObserverNotification, getReceiver, postNotify, preNotify
-
-
-
-
Constructor Detail
-
AfterTypeDiscoveryImpl
protected AfterTypeDiscoveryImpl(BeanManagerImpl beanManager, BeanDeploymentArchiveMapping bdaMapping, org.jboss.weld.bootstrap.spi.Deployment deployment, Collection<ContextHolder<? extends Context>> contexts)
-
-
Method Detail
-
fire
public static void fire(BeanManagerImpl beanManager, org.jboss.weld.bootstrap.spi.Deployment deployment, BeanDeploymentArchiveMapping bdaMapping, Collection<ContextHolder<? extends Context>> contexts)
-
getAlternatives
public List<Class<?>> getAlternatives()
- Specified by:
getAlternativesin interfaceAfterTypeDiscovery- Returns:
- the list of enabled alternatives for the application, sorted by priority in ascending order. Alternatives enabled for a bean archive are not included.
-
getInterceptors
public List<Class<?>> getInterceptors()
- Specified by:
getInterceptorsin interfaceAfterTypeDiscovery- Returns:
- the list of enabled interceptors for the application, sorted by priority in ascending order. Interceptors enabled for a bean archive are not included.
-
getDecorators
public List<Class<?>> getDecorators()
- Specified by:
getDecoratorsin interfaceAfterTypeDiscovery- Returns:
- the list of enabled decorators for the application, sorted by priority in ascending order. Decorators enabled for a bean archive are not included.
-
addAnnotatedType
public void addAnnotatedType(AnnotatedType<?> type, String id)
Description copied from interface:AfterTypeDiscoveryAdds a given
AnnotatedTypeto the set of types which will be scanned during bean discovery.Thanks to the id parameter, this method allows multiple annotated types, based on the same underlying type, to be defined.
AnnotatedTypes discovered by the container use the fully qualified class name ofAnnotatedType.getJavaClass()to identify the type.AfterBeanDiscovery.getAnnotatedType(Class, String)andAfterBeanDiscovery.getAnnotatedTypes(Class)allows annotated types to be obtained by identifier.- Specified by:
addAnnotatedTypein interfaceAfterTypeDiscovery- Parameters:
type- TheAnnotatedTypeto add for later scanningid- the identifier used to distinguish this AnnotatedType from an other one based on the same underlying type
-
addAnnotatedType
public <T> AnnotatedTypeConfigurator<T> addAnnotatedType(Class<T> type, String id)
Description copied from interface:AfterTypeDiscoveryObtains a new
AnnotatedTypeConfiguratorto configure a newAnnotatedTypeand add it to the set of types which will be scanned during bean discovery at the end of the observer invocation. Calling this method multiple times will return a new AnnotatedTypeConfigurator.Thanks to the id parameter, this method allows multiple annotated types, based on the same underlying type, to be defined.
AnnotatedTypes discovered by the container use the fully qualified class name ofAnnotatedType.getJavaClass()to identify the type.
Each call returns a new AnnotatedTypeConfigurator.AfterBeanDiscovery.getAnnotatedType(Class, String)andAfterBeanDiscovery.getAnnotatedTypes(Class)allows annotated types to be obtained by identifier.- Specified by:
addAnnotatedTypein interfaceAfterTypeDiscovery- Parameters:
type- class used to initialized the type and annotations on theAnnotatedTypeConfiguratorid- the identifier used to distinguish this AnnotatedType from an other one based on the same underlying type- Returns:
- a non reusable
AnnotatedTypeConfiguratorto configure the new AnnotatedType
-
storeSyntheticAnnotatedType
protected void storeSyntheticAnnotatedType(BeanDeployment deployment, AnnotatedType<?> type, String id)
- Overrides:
storeSyntheticAnnotatedTypein classAbstractAnnotatedTypeRegisteringEvent
-
-