The event type of the second event fired by the container when it has fully completed the bean discovery process, validated
that there are no definition errors relating to the discovered beans, and registered javax.enterprise.inject.spi.Bean
and javax.enterprise.inject.spi.ObserverMethod objects for the discovered beans, but before detecting deployment
problems.
A portable extension may take advantage of this event to register beans, interceptors, decorators, observer methods and custom context objects with the container.
void afterBeanDiscovery(@Observes AfterBeanDiscovery event, BeanManager manager) { ... }
If any observer method of the AfterBeanDiscovery event throws an exception, the exception is treated as a definition
error by the container.
| Modifier and Type | Method and Description |
|---|---|
| public void | addBean(Bean<?>
The bean to add to the deployment bean)Fires an event of type |
| public <T> BeanConfigurator | Returns: a non reusableBeanConfigurator to configure the bean to addObtains a new |
| public void | addContext(Context
The custom context to add to the deployment context)Registers a custom |
| public void | addDefinitionError(Throwable
The definition error as a t)java.lang.ThrowableRegisters a definition error with the container, causing the container to abort deployment after all observers have been notified. |
| public void | addObserverMethod(ObserverMethod<?>
The custom observer method to add to the deployment observerMethod)Fires an event of type |
| public <T> ObserverMethodConfigurator | Returns: a non reusableObserverMethodConfigurator instanceobtains a new |
| public < the class or interface T> AnnotatedType | Returns: theAnnotatedTypethe type, String java.lang.Class objectthe type identifier. If null, the fully qualifier class name of type is used id)Obtain the |
| public < the class or interface T> Iterable | Returns: theAnnotatedTypesthe type)java.lang.Class objectObtain the |
| addBean | back to summary |
|---|---|
| public void addBean(Bean<?> bean) Fires an event of type
| |
| addBean | back to summary |
|---|---|
| public <T> BeanConfigurator Obtains a new
| |
| addContext | back to summary |
|---|---|
| public void addContext(Context context) Registers a custom
| |
| addDefinitionError | back to summary |
|---|---|
| public void addDefinitionError(Throwable t) Registers a definition error with the container, causing the container to abort deployment after all observers have been notified.
| |
| addObserverMethod | back to summary |
|---|---|
| public void addObserverMethod(ObserverMethod<?> observerMethod) Fires an event of type
| |
| addObserverMethod | back to summary |
|---|---|
| public <T> ObserverMethodConfigurator obtains a new
| |
| getAnnotatedType | back to summary |
|---|---|
| public <T> AnnotatedType Obtain the
| |
| getAnnotatedTypes | back to summary |
|---|---|
| public <T> Iterable Obtain the
| |