|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.validator.util.annotationfactory.AnnotationDescriptor<T>
public class AnnotationDescriptor<T extends Annotation>
Encapsulates the data you need to create an annotation. In
particular, it stores the type of an Annotation
instance
and the values of its elements.
The "elements" we're talking about are the annotation attributes,
not its targets (the term "element" is used ambiguously
in Java's annotations documentation).
Constructor Summary | |
---|---|
AnnotationDescriptor(Class<T> annotationType)
|
|
AnnotationDescriptor(Class<T> annotationType,
Map<String,Object> elements)
|
Method Summary | ||
---|---|---|
boolean |
containsElement(String elementName)
|
|
Map<String,Object> |
getElements()
Returns a map with the elements contained in this descriptor keyed by name. |
|
static
|
getInstance(Class<S> annotationType)
Returns a new descriptor for the given annotation type. |
|
static
|
getInstance(Class<S> annotationType,
Map<String,Object> elements)
Returns a new descriptor for the given annotation type. |
|
int |
numberOfElements()
|
|
void |
setValue(String elementName,
Object value)
|
|
Class<T> |
type()
|
|
Object |
valueOf(String elementName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationDescriptor(Class<T> annotationType)
public AnnotationDescriptor(Class<T> annotationType, Map<String,Object> elements)
Method Detail |
---|
public static <S extends Annotation> AnnotationDescriptor<S> getInstance(Class<S> annotationType)
S
- The type of the annotation.annotationType
- The annotation's class.
public static <S extends Annotation> AnnotationDescriptor<S> getInstance(Class<S> annotationType, Map<String,Object> elements)
S
- The type of the annotation.annotationType
- The annotation's class.elements
- A map with attribute values for the annotation to be created.
public void setValue(String elementName, Object value)
public Object valueOf(String elementName)
public boolean containsElement(String elementName)
public int numberOfElements()
public Map<String,Object> getElements()
public Class<T> type()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |