Annotation Type AroundConstruct

  • @Target(METHOD)
    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.

     public void <METHOD>(InvocationContext ctx) { ... }
     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.

    Interceptors 1.2