Annotation Interface OverridesAttribute


@Documented @Retention(RUNTIME) @Target(METHOD) @Repeatable(List.class) public @interface OverridesAttribute
Marks an attribute as overriding the attribute of a composing constraint. Both attributes must share the same type.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Defines several OverridesAttribute annotations on the same element
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Annotation>
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    The index of the targeted constraint declaration when using multiple constraints of the same type.
    Name of the Constraint attribute overridden.
  • Element Details

    • constraint

      Class<? extends Annotation> constraint
      Returns:
      constraint type the attribute is overriding
    • name

      String name
      Name of the Constraint attribute overridden. Defaults to the name of the attribute hosting @OverridesAttribute.
      Returns:
      name of constraint attribute overridden
      Default:
      ""
    • 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 the value() 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