public enum ConstraintAnnotationAttributes extends Enum<ConstraintAnnotationAttributes>
Constraint
annotations.Modifier and Type | Class and Description |
---|---|
class |
ConstraintAnnotationAttributes.Worker<C extends Annotation> |
Enum Constant and Description |
---|
GROUPS
"groups"
|
MESSAGE
"message"
|
PAYLOAD
"payload"
|
VALIDATION_APPLIES_TO
"validationAppliesTo"
|
VALUE
"value" for multi-valued constraints
|
Modifier and Type | Method and Description |
---|---|
<C extends Annotation> |
analyze(Class<C> clazz) |
<V> V |
get(Map<? super String,? super V> map)
Get the value of
this.attributeName from map . |
String |
getAttributeName()
Get the attribute name represented.
|
Class<?> |
getType()
Get the expected type of the represented attribute.
|
boolean |
isMandatory() |
boolean |
isValidDefaultValue(Object o) |
<V> Object |
put(Map<? super String,? super V> map,
V value)
Put
value into a map with this.attributeName as
key. |
String |
toString() |
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 VALIDATION_APPLIES_TO
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 Class<?> getType()
public String getAttributeName()
public String toString()
toString
in class Enum<ConstraintAnnotationAttributes>
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 <C extends Annotation> ConstraintAnnotationAttributes.Worker<C> analyze(Class<C> clazz)
public boolean isMandatory()
public boolean isValidDefaultValue(Object o)
Copyright © 2010–2020 The Apache Software Foundation. All rights reserved.