Annotation Type AroundConstruct
-
@Target(METHOD) @Retention(RUNTIME) public @interface AroundConstruct
Designates an interceptor method that receives a callback when the target class constructor is invoked.The method to which the
AroundConstruct
annotation is applied must have one of the following signatures.void <METHOD>(InvocationContext ctx) Object <METHOD>(InvocationContext ctx)
The method must not be declared as abstract, final, or static.
An
AroundConstruct
interceptor method may be only declared in an interceptor class or superclass of an interceptor class.An interceptor class must not declare more than one
AroundConstruct
method.The target instance is created and its constructor injection is performed, if applicable, when the last interceptor method in the
AroundConstruct
interceptor chain invokes theInvocationContext.proceed()
method.An
AroundConstruct
interceptor method should exercise caution accessing the instance whose constructor it interposes on.AroundConstruct
methods may throw any exceptions that are allowed by the throws clause of the constructor on which they are interposing.- Since:
- Jakarta Interceptors 1.2