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

public Interface InterceptorInfo

extends BeanInfo
Imports
jakarta.enterprise.inject.spi.InterceptionType, jakarta.enterprise.lang.model.AnnotationInfo, java.util.Collection

Interceptors are managed beans annotated @Interceptor. An interceptor declares a set of interceptor binding annotations, used to associate the interceptor with target beans. It also declares at most one interceptor method for each interception type. Interception types are: Finally, an interceptor also needs to declare a @Priority to become enabled.

Note that this description applies to CDI Lite. There are more ways to declare an interceptor, but those are only present in CDI Full.

Since
4.0

Method Summary

Modifier and TypeMethod and Description
public default InterceptorInfo
public Collection<AnnotationInfo>

Returns:

immutable set of interceptor binding annotations, never null
interceptorBindings
()

Returns the set of interceptor binding annotations declared on this interceptor.

public boolean

Returns:

whether this interceptor declares an interceptor method for given interception type
intercepts
(InterceptionType
the type of interception
interceptionType
)

Returns whether this interceptor declares an interceptor method for given interception type.

public default boolean
isInterceptor()

Overrides default jakarta.enterprise.inject.build.compatible.spi.BeanInfo.isInterceptor.

Returns whether this bean is an interceptor.
Inherited from jakarta.enterprise.inject.build.compatible.spi.BeanInfo:
declaringClassdisposerinjectionPointsisAlternativeisClassBeanisProducerFieldisProducerMethodisSyntheticnamepriorityproducerFieldproducerMethodqualifiersscopestereotypestypes

Method Detail

asInterceptorback to summary
public default InterceptorInfo asInterceptor()

Overrides default jakarta.enterprise.inject.build.compatible.spi.BeanInfo.asInterceptor.

Doc from jakarta.enterprise.inject.build.compatible.spi.BeanInfo.asInterceptor.

Returns this bean as an interceptor.

Returns:InterceptorInfo

this interceptor, never null

Annotations
@Override
interceptorBindingsback to summary
public Collection<AnnotationInfo> interceptorBindings()

Returns the set of interceptor binding annotations declared on this interceptor.

Returns:Collection<AnnotationInfo>

immutable set of interceptor binding annotations, never null

interceptsback to summary
public boolean intercepts(InterceptionType interceptionType)

Returns whether this interceptor declares an interceptor method for given interception type.

Parameters
interceptionType:InterceptionType

the type of interception

Returns:boolean

whether this interceptor declares an interceptor method for given interception type

isInterceptorback to summary
public default boolean isInterceptor()

Overrides default jakarta.enterprise.inject.build.compatible.spi.BeanInfo.isInterceptor.

Doc from jakarta.enterprise.inject.build.compatible.spi.BeanInfo.isInterceptor.

Returns whether this bean is an interceptor.

Returns:boolean

whether this bean is an interceptor

Annotations
@Override