public class AfterBeanDiscoveryImpl extends AbstractBeanDiscoveryEvent implements AfterBeanDiscovery
Modifier | Constructor and Description |
---|---|
protected |
AfterBeanDiscoveryImpl(BeanManagerImpl beanManager,
Deployment deployment,
Map<BeanDeploymentArchive,BeanDeployment> beanDeployments,
Collection<ContextHolder<? extends Context>> contexts) |
Modifier and Type | Method and Description |
---|---|
void |
addBean(Bean<?> bean)
Fires an event of type
ProcessBean containing the given
Bean and then registers the Bean with the
container, thereby making it available for injection into other beans. |
void |
addContext(Context context)
Registers a custom
Context object with the container. |
void |
addDefinitionError(Throwable t)
Registers a definition error with the container, causing the container to abort deployment after all observers have been
notified.
|
void |
addObserverMethod(ObserverMethod<?> observerMethod)
Fires an event of type
ProcessObserverMethod containing the given
ObserverMethod and then registers the
ObserverMethod with the container, thereby making it available for event
notifications. |
static void |
fire(BeanManagerImpl beanManager,
Deployment deployment,
Map<BeanDeploymentArchive,BeanDeployment> beanDeployments,
Collection<ContextHolder<? extends Context>> contexts) |
<T> AnnotatedType<T> |
getAnnotatedType(Class<T> type,
String id)
Obtain the
AnnotatedType that may be used to read the annotations of the given class or interface as defined
during container initialization. |
<T> Iterable<AnnotatedType<T>> |
getAnnotatedTypes(Class<T> type)
Obtain the
AnnotatedType s that may be used to read the annotations of the given class or interface as defined
during container initialization. |
List<Throwable> |
getDefinitionErrors() |
protected <T> void |
processBean(Bean<T> b) |
getBeanDeployments, getDeployment, getOrCreateBeanDeployment, getTypeStore
fire
getActualTypeArguments, getBeanManager, getErrors, getObserverMethod, getRawType, getReceiver, setObserverMethod, setReceiver
protected AfterBeanDiscoveryImpl(BeanManagerImpl beanManager, Deployment deployment, Map<BeanDeploymentArchive,BeanDeployment> beanDeployments, Collection<ContextHolder<? extends Context>> contexts)
public static void fire(BeanManagerImpl beanManager, Deployment deployment, Map<BeanDeploymentArchive,BeanDeployment> beanDeployments, Collection<ContextHolder<? extends Context>> contexts)
public void addDefinitionError(Throwable t)
AfterBeanDiscovery
addDefinitionError
in interface AfterBeanDiscovery
t
- The definition error as a Throwable
public void addBean(Bean<?> bean)
AfterBeanDiscovery
ProcessBean
containing the given
Bean
and then registers the Bean
with the
container, thereby making it available for injection into other beans. The given Bean
may implement Interceptor
or Decorator
.addBean
in interface AfterBeanDiscovery
bean
- The bean to add to the deploymentprotected <T> void processBean(Bean<T> b)
public void addContext(Context context)
AfterBeanDiscovery
Context
object with the container.addContext
in interface AfterBeanDiscovery
context
- The custom context to add to the deploymentpublic void addObserverMethod(ObserverMethod<?> observerMethod)
AfterBeanDiscovery
ProcessObserverMethod
containing the given
ObserverMethod
and then registers the
ObserverMethod
with the container, thereby making it available for event
notifications.addObserverMethod
in interface AfterBeanDiscovery
observerMethod
- The custom observer method to add to the deploymentpublic <T> AnnotatedType<T> getAnnotatedType(Class<T> type, String id)
AfterBeanDiscovery
AnnotatedType
that may be used to read the annotations of the given class or interface as defined
during container initialization.getAnnotatedType
in interface AfterBeanDiscovery
T
- the class or interfacetype
- the Class
objectid
- the type identifier. If null, the fully qualifier class name of type is usedAnnotatedType
public <T> Iterable<AnnotatedType<T>> getAnnotatedTypes(Class<T> type)
AfterBeanDiscovery
AnnotatedType
s that may be used to read the annotations of the given class or interface as defined
during container initialization.getAnnotatedTypes
in interface AfterBeanDiscovery
T
- the class or interfacetype
- the Class
objectAnnotatedType
sCopyright © 2013 Seam Framework. All Rights Reserved.