@Target(value=METHOD) @Retention(value=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 the
InvocationContext.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.
Copyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.