@Inherited @Target(value=ANNOTATION_TYPE) @Retention(value=RUNTIME) @Documented public @interface InterceptionBinder
Interceptor
) and a class to be intercepted
(annotated with Intercepted
).
The annotation on which this annotation is placed must
have RUNTIME retention and have a Target of TYPE or
METHOD (or ANNOTATION_TYPE for transitive bindings).
When an annotation annotated with this annotation is put
on an implementation of
MethodInterceptor
or
ConstructorInterceptor
and
which is also annotated with Interceptor
then it becomes
associated with that interceptor. These interceptors will
be called on methods of any service annotated with
Intercepted
appropriately.
When an annotation annotated with this annotation is
used with an hk2 service marked with Intercepted
it can either be put on the entire class, in which case EVERY method
of that class will be intercepted, or it can be placed on individual
methods of the service to indicate that only those methods should be
intercepted. If it is placed both at the class level and on individual
methods then every method will be intercepted.
Annotations annotated with InterceptionBinder are transitive. In other
words if an annotation is annotated with ANOTHER annotation that is
marked with InterceptionBinder then any interceptor marked with the other
annotation also applies to any service or method marked with this annotationCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.