Top Description Methods
jakarta.enterprise.inject.build.compatible.spi

public @Interface Registration

extends Annotation
Annotations
@Target:METHOD
@Retention:RUNTIME
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

3rd phase of build compatible extension execution. Allows observing registered beans and observers.

This phase is executed twice. For non-synthetic beans and observers, this phase is executed before synthesis. For synthetic beans and observers, this phase is executed after synthesis.

In the following text, the term expected types denotes the set of types defined by the types member of the @Registration annotation.

Methods annotated @Registration must declare exactly one parameter of one of these types:

If a @Registration method has a parameter of type BeanInfo, the method is called once for each bean whose set of bean types contains at least one expected type.

If the @Registration method has a parameter of type InterceptorInfo, the method is called once for each interceptor whose set of bean types contains at least one expected type.

If the @Registration method has a parameter of type ObserverInfo, the method is called once for each observer whose observed event type is assignable to at least one expected type.

Note that interceptors are beans, and InterceptorInfo is a subtype of BeanInfo, so if the method has a parameter of type BeanInfo, it will be called for interceptors as well.

If the @Registration method doesn't declare any parameter of one of these types, or if it declares more than one, the container treats it as a definition error.

Additionally, methods annotated @Registration may declare parameters of these types:

Since
4.0

Method Summary

Modifier and TypeMethod and Description
public Class<?>[]

Returns:

the set of expected types
types
()

Defines the set of expected types.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

typesback to summary
public Class<?>[] types()

Defines the set of expected types.

Returns:Class<?>[]

the set of expected types