- 
- All Superinterfaces:
 BeanInfo
public interface InterceptorInfo extends BeanInfo
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:@AroundInvoke: intercept business method invocations,@AroundConstruct: intercept constructor invocations,@PostConstruct: called after the container creates the target instance and completes dependency injection,@PreDestroy: called before the container destroys the target instance.
@Priorityto 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default InterceptorInfoasInterceptor()Returns this bean as an interceptor.java.util.Collection<AnnotationInfo>interceptorBindings()Returns the set of interceptor binding annotations declared on this interceptor.booleanintercepts(InterceptionType interceptionType)Returns whether this interceptor declares an interceptor method for given interception type.default booleanisInterceptor()Returns whether this bean is an interceptor.- 
Methods inherited from interface jakarta.enterprise.inject.build.compatible.spi.BeanInfo
declaringClass, disposer, injectionPoints, isAlternative, isClassBean, isProducerField, isProducerMethod, isSynthetic, name, priority, producerField, producerMethod, qualifiers, scope, stereotypes, types 
 - 
 
 - 
 
- 
- 
Method Detail
- 
interceptorBindings
java.util.Collection<AnnotationInfo> interceptorBindings()
Returns the set of interceptor binding annotations declared on this interceptor.- Returns:
 - immutable set of interceptor binding annotations, never 
null 
 
- 
intercepts
boolean intercepts(InterceptionType interceptionType)
Returns whether this interceptor declares an interceptor method for given interception type.- Parameters:
 interceptionType- the type of interception- Returns:
 - whether this interceptor declares an interceptor method for given interception type
 
 
- 
isInterceptor
default boolean isInterceptor()
Description copied from interface:BeanInfoReturns whether this bean is an interceptor.- Specified by:
 isInterceptorin interfaceBeanInfo- Returns:
 - whether this bean is an interceptor
 
 
- 
asInterceptor
default InterceptorInfo asInterceptor()
Description copied from interface:BeanInfoReturns this bean as an interceptor.- Specified by:
 asInterceptorin interfaceBeanInfo- Returns:
 - this interceptor, never 
null 
 
 - 
 
 -