javax.validation
Annotation Type OverridesAttribute


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface OverridesAttribute

Mark an attribute as overriding the attribute of a composing constraint. Both attributes must share the same type.

Author:
Emmanuel Bernard

Required Element Summary
 java.lang.Class<? extends java.lang.annotation.Annotation> constraint
           
 java.lang.String name
          Name of the Constraint attribute overridden.
 
Optional Element Summary
 int constraintIndex
          The index of the targeted constraint declaration when using multiple constraints of the same type.
 

Element Detail

constraint

public abstract java.lang.Class<? extends java.lang.annotation.Annotation> constraint
Returns:
Constraint type the attribute is overriding

name

public abstract java.lang.String name
Name of the Constraint attribute overridden. Defaults to the name of the attribute hosting @OverridesAttribute.

Returns:
name of constraint attribute overridden.

constraintIndex

public abstract 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


Submit a bug or feature

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41


Spec-Zone.ru - all specs in one place



free hit counter