Package javax.validation
Annotation Type OverridesAttribute
-
@Retention(RUNTIME) @Target(METHOD) public @interface OverridesAttribute
Marks an attribute as overriding the attribute of a composing constraint. Both attributes must share the same type.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class<? extends java.lang.annotation.Annotation>
constraint
java.lang.String
name
Name of the Constraint attribute overridden.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description int
constraintIndex
The index of the targeted constraint declaration when using multiple constraints of the same type.
-
-
-
-
constraintIndex
int constraintIndex
The index of the targeted constraint declaration when using multiple constraints of the same type. The index represents the index of the constraint in thevalue()
array. By default, no index is defined and the single constraint declaration is targeted.- Returns:
- constraint declaration index if multivalued annotation is used
- Default:
- -1
-
-