@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 this annotation is applied must have one of the following signatures.
@AroundConstruct public void <METHOD>(InvocationContext ctx) { ... }
@AroundConstruct public Object <METHOD>(InvocationContext ctx) throws Exception { ... }
An AroundConstruct interceptor method may be only declared on an interceptor class.
An interceptor class must not declare more than one AroundConstruct method.
AroundConstruct methods may throw runtime exceptions, but not checked exceptions.
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 which constructor it interposes on.
Copyright © 2019 JBoss by Red Hat. All rights reserved.