public enum ConstraintAnnotationAttributes extends Enum<ConstraintAnnotationAttributes>
Constraint
annotations.Enum Constant and Description |
---|
GROUPS
"groups"
|
MESSAGE
"message"
|
PAYLOAD
"payload"
|
VALUE
"value" for multi-valued constraints
|
Modifier and Type | Method and Description |
---|---|
<V> V |
get(Map<? super String,? super V> map)
Get the value of
this.attributeName from map . |
String |
getAttributeName()
Get the attribute name represented.
|
<T,A extends Annotation> |
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.
|
<T> T |
getValue(Annotation constraint)
Get the value of this attribute from the specified constraint annotation.
|
<A extends Annotation> |
isDeclaredOn(Class<A> type)
Benign means of checking for an attribute's existence.
|
<V> Object |
put(Map<? super String,? super V> map,
V value)
Put
value into a map with this.attributeName as
key. |
<A extends Annotation> |
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.
|
public static final ConstraintAnnotationAttributes MESSAGE
public static final ConstraintAnnotationAttributes GROUPS
public static final ConstraintAnnotationAttributes PAYLOAD
public static final ConstraintAnnotationAttributes VALUE
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 nameNullPointerException
- 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
- javax.validation.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
- Copyright © 2010–2013 The Apache Software Foundation. All rights reserved.