All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.enterprise.inject.spi.ProcessBeanAttributes Maven / Gradle / Ivy

There is a newer version: 2.0.SP1
Show newest version
package javax.enterprise.inject.spi;

import javax.enterprise.inject.New;

/**
 * 

* The container fires an event of this type for each enabled bean, interceptor or decorator deployed in a bean archive before * registering the {@link javax.enterprise.inject.spi.Bean} object. *

*

* No event is fired for {@link New} qualified beans. *

*

* If any observer method of a {@code ProcessBeanAttributes} event throws an exception, the exception is treated as a definition * error by the container. *

* * @author Pete Muir * @param The class of the bean * @since 1.1 */ public interface ProcessBeanAttributes { /** * @return the {@link AnnotatedType} representing the managed bean class or session bean class, the {@link AnnotatedMethod} * representing the producer field, or the {@link AnnotatedField} representing the producer field * @throws IllegalStateException if called outside of the observer method invocation */ public Annotated getAnnotated(); /** * @return the {@link BeanAttributes} object that will be used by the container to manage instances of the bean * @throws IllegalStateException if called outside of the observer method invocation */ public BeanAttributes getBeanAttributes(); /** * Replaces the {@link BeanAttributes}. * * @param beanAttributes the new {@link BeanAttributes} to use * @throws IllegalStateException if called outside of the observer method invocation */ public void setBeanAttributes(BeanAttributes beanAttributes); /** * Registers a definition error with the container, causing the container to abort deployment after bean discovery is * complete. * * @param t the error to add * @throws IllegalStateException if called outside of the observer method invocation */ public void addDefinitionError(Throwable t); /** * Forces the container to ignore the bean. * @throws IllegalStateException if called outside of the observer method invocation */ public void veto(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy