Top Description Methods
jakarta.enterprise.inject.spi

public Interface ProcessBean<X>

Known Direct Subinterfaces
jakarta.enterprise.inject.spi.ProcessManagedBean, jakarta.enterprise.inject.spi.ProcessProducerField, jakarta.enterprise.inject.spi.ProcessProducerMethod, jakarta.enterprise.inject.spi.ProcessSyntheticBean
Type Parameters
<X>
The class of the bean
Imports
jakarta.decorator.Decorator

The container fires an event of this type for each enabled bean, interceptor or decorator deployed in a bean archive, before registering the Bean object.

The event object type depends upon what kind of bean was discovered:

Resources are considered to be producer fields.

If any observer method of a ProcessBean event throws an exception, the exception is treated as a definition error by the container.

CDI Lite implementations are not required to provide support for Portable Extensions.

Author
David Allen
See Also
Bean

Method Summary

Modifier and TypeMethod and Description
public void
addDefinitionError(Throwable
The definition error to register as a java.lang.Throwable
t
)

Registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.

public Annotated

Returns:

the Annotated for the bean being registered
getAnnotated
()

Returns the AnnotatedType representing the bean class, the AnnotatedMethod representing the producer method, or the AnnotatedField representing the producer field.

public Bean<X>

Returns:

the Bean object about to be registered
getBean
()

Returns the Bean object that is about to be registered.

Method Detail

addDefinitionErrorback to summary
public void addDefinitionError(Throwable t)

Registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.

Parameters
t:Throwable

The definition error to register as a java.lang.Throwable

Exceptions
IllegalStateException:
if called outside of the observer method invocation
getAnnotatedback to summary
public Annotated getAnnotated()

Returns the AnnotatedType representing the bean class, the AnnotatedMethod representing the producer method, or the AnnotatedField representing the producer field.

If invoked upon a ProcessSyntheticBean event, non-portable behavior results and the returned value should be ignored.

Returns:Annotated

the Annotated for the bean being registered

Exceptions
IllegalStateException:
if called outside of the observer method invocation
getBeanback to summary
public Bean<X> getBean()

Returns the Bean object that is about to be registered. The Bean may implement Interceptor or Decorator.

Returns:Bean<X>

the Bean object about to be registered

Exceptions
IllegalStateException:
if called outside of the observer method invocation