Class BeforeBeanDiscoveryImpl
- 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.BeforeBeanDiscoveryImpl
-
- All Implemented Interfaces:
BeforeBeanDiscovery,NotificationListener
public class BeforeBeanDiscoveryImpl extends AbstractAnnotatedTypeRegisteringEvent implements BeforeBeanDiscovery
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.weld.bootstrap.events.AbstractAnnotatedTypeRegisteringEvent
AbstractAnnotatedTypeRegisteringEvent.AnnotatedTypeRegistration<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected List<AnnotatedTypeConfiguratorImpl<? extends Annotation>>additionalInterceptorBindingsprotected List<AnnotatedTypeConfiguratorImpl<? extends Annotation>>additionalQualifiers-
Fields inherited from class org.jboss.weld.bootstrap.events.AbstractAnnotatedTypeRegisteringEvent
additionalAnnotatedTypes
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBeforeBeanDiscoveryImpl(BeanManagerImpl beanManager, org.jboss.weld.bootstrap.spi.Deployment deployment, BeanDeploymentArchiveMapping bdaMapping, 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 invocationvoidaddAnnotatedType(AnnotatedType<?> source)Adds a givenAnnotatedTypeto the set of types which will be scanned during bean discovery.voidaddAnnotatedType(AnnotatedType<?> type, String id)Adds a givenAnnotatedTypeto the set of types which will be scanned during bean discovery.voidaddInterceptorBinding(Class<? extends Annotation> bindingType, Annotation... bindingTypeDef)Declares an annotation type as an interceptor binding type, and specifies its meta-annotations.voidaddInterceptorBinding(AnnotatedType<? extends Annotation> bindingType)Declares an annotation type as an interceptor binding type.voidaddQualifier(Class<? extends Annotation> bindingType)Declares an annotation type as a Qualifier qualifier type.voidaddQualifier(AnnotatedType<? extends Annotation> qualifier)Declares an annotation type as a Qualifier qualifier type.voidaddScope(Class<? extends Annotation> scopeType, boolean normal, boolean passivating)Declares an annotation type as a scope type.voidaddStereotype(Class<? extends Annotation> stereotype, Annotation... stereotypeDef)Declares an annotation type as a stereotype, and specifies its meta-annotations.<T extends Annotation>
AnnotatedTypeConfigurator<T>configureInterceptorBinding(Class<T> bindingType)Obtains a newAnnotatedTypeConfiguratorto configure a newAnnotatedTypeand declares it as an interceptor binding type.<T extends Annotation>
AnnotatedTypeConfigurator<T>configureQualifier(Class<T> qualifier)Obtains a newAnnotatedTypeConfiguratorto configure a newAnnotatedTypeand declares it as a Qualifier qualifier type.protected voidfinish()static voidfire(BeanManagerImpl beanManager, org.jboss.weld.bootstrap.spi.Deployment deployment, BeanDeploymentArchiveMapping bdaMapping, Collection<ContextHolder<? extends Context>> contexts)-
Methods inherited from class org.jboss.weld.bootstrap.events.AbstractAnnotatedTypeRegisteringEvent
addSyntheticAnnotatedType, storeSyntheticAnnotatedType
-
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
-
-
-
-
Field Detail
-
additionalQualifiers
protected final List<AnnotatedTypeConfiguratorImpl<? extends Annotation>> additionalQualifiers
-
additionalInterceptorBindings
protected final List<AnnotatedTypeConfiguratorImpl<? extends Annotation>> additionalInterceptorBindings
-
-
Constructor Detail
-
BeforeBeanDiscoveryImpl
protected BeforeBeanDiscoveryImpl(BeanManagerImpl beanManager, org.jboss.weld.bootstrap.spi.Deployment deployment, BeanDeploymentArchiveMapping bdaMapping, 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)
-
addQualifier
public void addQualifier(Class<? extends Annotation> bindingType)
Description copied from interface:BeforeBeanDiscoveryDeclares an annotation type as a Qualifier qualifier type.
This is only required if you wish to make an annotation a qualifier without adding
Qualifierto it.- Specified by:
addQualifierin interfaceBeforeBeanDiscovery- Parameters:
bindingType- The annotation to treat as a qualifier
-
addInterceptorBinding
public void addInterceptorBinding(Class<? extends Annotation> bindingType, Annotation... bindingTypeDef)
Description copied from interface:BeforeBeanDiscoveryDeclares an annotation type as an interceptor binding type, and specifies its meta-annotations.
This is only required if you wish to make an annotation an interceptor binding type without adding
InterceptorBindingto it.- Specified by:
addInterceptorBindingin interfaceBeforeBeanDiscovery- Parameters:
bindingType- The annotation type to treat as an interceptor binding typebindingTypeDef- An optional list of annotations defining the interceptor
-
addScope
public void addScope(Class<? extends Annotation> scopeType, boolean normal, boolean passivating)
Description copied from interface:BeforeBeanDiscoveryDeclares an annotation type as a scope type.
This is only required if you wish to make an annotation a scope type without adding the
NormalScopeorScopeannotations to it. You can also use this method to override an existing normal scope definition.- Specified by:
addScopein interfaceBeforeBeanDiscovery- Parameters:
scopeType- The annotation type to treat as a scope typenormal- Indicates if the scope is normalpassivating- Indicates if the scope is passivation capable- See Also:
AfterBeanDiscovery.addContext(javax.enterprise.context.spi.Context)
-
addStereotype
public void addStereotype(Class<? extends Annotation> stereotype, Annotation... stereotypeDef)
Description copied from interface:BeforeBeanDiscoveryDeclares an annotation type as a stereotype, and specifies its meta-annotations.
This is only required if you wish to make an annotation a stereotype without adding
Stereotypeto it. You can also use this method to override an existing stereotype definition.- Specified by:
addStereotypein interfaceBeforeBeanDiscovery- Parameters:
stereotype- The annotation type to treat as a stereotypestereotypeDef- An optional list of annotations defining the stereotype
-
addAnnotatedType
public void addAnnotatedType(AnnotatedType<?> source)
Description copied from interface:BeforeBeanDiscoveryAdds a given
AnnotatedTypeto the set of types which will be scanned during bean discovery.This method is deprecated from CDI 1.1 and
BeforeBeanDiscovery.addAnnotatedType(AnnotatedType, String)should be used instead.- Specified by:
addAnnotatedTypein interfaceBeforeBeanDiscovery- Parameters:
source- TheAnnotatedTypeto add for later scanning
-
addAnnotatedType
public void addAnnotatedType(AnnotatedType<?> type, String id)
Description copied from interface:BeforeBeanDiscoveryAdds 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 interfaceBeforeBeanDiscovery- 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:BeforeBeanDiscoveryObtains 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 invocationThanks to the id parameter, this method allows multiple annotated types, based on the same underlying type, to be defined with a builder.
AnnotatedTypes discovered by the container use the fully qualified class name ofAnnotatedType.getJavaClass()to identify the type.
Each call returns a new AnnotatedTypeConfiguratorAfterBeanDiscovery.getAnnotatedType(Class, String)andAfterBeanDiscovery.getAnnotatedTypes(Class)allows annotated types to be obtained by identifier.- Specified by:
addAnnotatedTypein interfaceBeforeBeanDiscovery- 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
-
addQualifier
public void addQualifier(AnnotatedType<? extends Annotation> qualifier)
Description copied from interface:BeforeBeanDiscoveryDeclares an annotation type as a Qualifier qualifier type.
This is only required if you wish to make an annotation a qualifier without adding
Qualifierto it.- Specified by:
addQualifierin interfaceBeforeBeanDiscovery- Parameters:
qualifier- The annotation to treat as a qualifier
-
addInterceptorBinding
public void addInterceptorBinding(AnnotatedType<? extends Annotation> bindingType)
Description copied from interface:BeforeBeanDiscoveryDeclares an annotation type as an interceptor binding type.
This is only required if you wish to make an annotation an interceptor binding type without adding
InterceptorBindingto it.- Specified by:
addInterceptorBindingin interfaceBeforeBeanDiscovery- Parameters:
bindingType- The annotation type to treat as an interceptor binding type
-
configureQualifier
public <T extends Annotation> AnnotatedTypeConfigurator<T> configureQualifier(Class<T> qualifier)
Description copied from interface:BeforeBeanDiscoveryObtains a new
AnnotatedTypeConfiguratorto configure a newAnnotatedTypeand declares it as a Qualifier qualifier type.This is only required if you wish to make an annotation a qualifier without adding
Qualifierto it and need to easily add other annotations (likeNonbindingon its members.- Specified by:
configureQualifierin interfaceBeforeBeanDiscovery- Parameters:
qualifier- The annotation class used to initialized the configurator- Returns:
- a non reusable
AnnotatedTypeConfiguratorto configure the qualifier
-
configureInterceptorBinding
public <T extends Annotation> AnnotatedTypeConfigurator<T> configureInterceptorBinding(Class<T> bindingType)
Description copied from interface:BeforeBeanDiscoveryObtains a new
AnnotatedTypeConfiguratorto configure a newAnnotatedTypeand declares it as an interceptor binding type.This is only required if you wish to make an annotation an interceptor binding type without adding
InterceptorBindingto it and need to easily add other annotations (likeNonbindingon its members.- Specified by:
configureInterceptorBindingin interfaceBeforeBeanDiscovery- Parameters:
bindingType- The annotation class used to initialized the configurator- Returns:
- a non reusable
AnnotatedTypeConfiguratorto configure the interceptor binding
-
finish
protected void finish()
- Overrides:
finishin classAbstractAnnotatedTypeRegisteringEvent
-
-