@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.@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.
| Modifier and Type | Method and Description |
|---|---|
| public default InterceptorInfo | asInterceptor()
Overrides default jakarta. Returns this bean as an interceptor. |
| public Collection | Returns: immutable set of interceptor binding annotations, nevernullReturns the set of interceptor binding annotations declared on this interceptor. |
| public boolean | Returns: whether this interceptor declares an interceptor method for given interception typethe type of interception interceptionType)Returns whether this interceptor declares an interceptor method for given interception type. |
| public default boolean | isInterceptor()
Overrides default jakarta. Returns whether this bean is an interceptor. |
| asInterceptor | back to summary |
|---|---|
| public default InterceptorInfo asInterceptor() Overrides default jakarta. Doc from jakarta. Returns this bean as an interceptor.
| |
| interceptorBindings | back to summary |
|---|---|
| public Collection Returns the set of interceptor binding annotations declared on this interceptor.
| |
| intercepts | back to summary |
|---|---|
| public boolean intercepts(InterceptionType interceptionType) Returns whether this interceptor declares an interceptor method for given interception type.
| |
| isInterceptor | back to summary |
|---|---|
| public default boolean isInterceptor() Overrides default jakarta. Doc from jakarta. Returns whether this bean is an interceptor.
| |