|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<ConstraintAnnotationAttributes>
org.apache.bval.jsr303.ConstraintAnnotationAttributes
public enum ConstraintAnnotationAttributes
Defines the well-known attributes of Constraint
annotations.
Enum Constant Summary | |
---|---|
GROUPS
"groups" |
|
MESSAGE
"message" |
|
PAYLOAD
"payload" |
|
VALUE
"value" for multi-valued constraints |
Method Summary | ||
---|---|---|
|
get(Map<? super String,? super V> map)
Get the value of this.attributeName from map . |
|
String |
getAttributeName()
Get the attribute name represented. |
|
|
getDefaultValue(Class<A> type)
Get the default value of this attribute on the given annotation type. |
|
Type |
getType()
Get the expected type of the represented attribute. |
|
|
getValue(Annotation constraint)
Get the value of this attribute from the specified constraint annotation. |
|
|
isDeclaredOn(Class<A> type)
Benign means of checking for an attribute's existence. |
|
|
put(Map<? super String,? super V> map,
V value)
Put value into a map with this.attributeName as
key. |
|
|
validateOn(Class<A> type)
Verify that this attribute is validly defined on the given type. |
|
static ConstraintAnnotationAttributes |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
|
static ConstraintAnnotationAttributes[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ConstraintAnnotationAttributes MESSAGE
public static final ConstraintAnnotationAttributes GROUPS
public static final ConstraintAnnotationAttributes PAYLOAD
public static final ConstraintAnnotationAttributes VALUE
Method Detail |
---|
public static ConstraintAnnotationAttributes[] values()
for (ConstraintAnnotationAttributes c : ConstraintAnnotationAttributes.values()) System.out.println(c);
public static ConstraintAnnotationAttributes valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic Type getType()
public String getAttributeName()
public <V> Object put(Map<? super String,? super V> map, V value)
value
into a map with this.attributeName
as
key.
V
- map
- value
-
this.attributeName
public <V> V get(Map<? super String,? super V> map)
this.attributeName
from map
.
V
- map
-
public <A extends Annotation> void validateOn(Class<A> type)
type
-
ConstraintDefinitionException
public <A extends Annotation> boolean isDeclaredOn(Class<A> type)
type
-
public <T> T getValue(Annotation constraint)
constraint
-
public <T,A extends Annotation> T getDefaultValue(Class<A> type)
T
- type
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |