@TargetSE(valueSE=ANNOTATION_TYPESE) @RetentionSE(valueSE=RUNTIMESE) @DocumentedSE public @interface InterceptorBinding
@Inherited @InterceptorBinding @Target({ TYPE, METHOD, CONSTRUCTOR }) @Retention(RUNTIME) public @interface Valid { }
インターセプターバインディングは、インターセプターをターゲット Bean に関連付けるために使用できる中間アノテーションです。
インターセプターのインターセプターバインディングは、バインディング型と Interceptor
アノテーションでインターセプタークラスにアノテーションを付けることによって指定されます。
@Valid @Interceptor public class ValidationInterceptor { ... }
インターセプターは、複数のインターセプターバインディングを指定できます。
Bean のインターセプターバインディングは、Bean クラス、Bean クラスのメソッド、Bean クラスのコンストラクターにインターセプターバインディング型のアノテーションを付けることで宣言できます。
@Valid public class Order { ... }
@Valid @Secure public void updateOrder(Order order) { ... }
@Valid public Order(...) { ... }
Bean クラスまたは Bean クラスのメソッドは、複数のインターセプターバインディングを宣言できます。
インターセプターバインディング型は、他のインターセプターバインディングを宣言できます。
@Inherited @InterceptorBinding @Target({ TYPE, METHOD }) @Retention(RUNTIME) @Valid public @interface Secure { }
インターセプターバインディングは推移的です。インターセプターバインディング型によって宣言されたインターセプターバインディングは、そのインターセプターバインディング型を宣言するすべての Bean および他のインターセプターバインディング型によって継承されます。
Interceptor
Copyright © 2019 Eclipse Foundation.
Use is subject to license terms.