org.hibernate.validator.util.annotationfactory
Class AnnotationDescriptor<T extends java.lang.annotation.Annotation>

java.lang.Object
  extended by org.hibernate.validator.util.annotationfactory.AnnotationDescriptor<T>

public class AnnotationDescriptor<T extends java.lang.annotation.Annotation>
extends java.lang.Object

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).

Author:
Paolo Perrotta, Davide Marchignoli, Hardy Ferentschik

Constructor Summary
AnnotationDescriptor(java.lang.Class<T> annotationType)
           
AnnotationDescriptor(java.lang.Class<T> annotationType, java.util.Map<java.lang.String,java.lang.Object> elements)
           
 
Method Summary
 boolean containsElement(java.lang.String elementName)
           
 int numberOfElements()
           
 void setValue(java.lang.String elementName, java.lang.Object value)
           
 java.lang.Class<T> type()
           
 java.lang.Object valueOf(java.lang.String elementName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationDescriptor

public AnnotationDescriptor(java.lang.Class<T> annotationType)

AnnotationDescriptor

public AnnotationDescriptor(java.lang.Class<T> annotationType,
                            java.util.Map<java.lang.String,java.lang.Object> elements)
Method Detail

setValue

public void setValue(java.lang.String elementName,
                     java.lang.Object value)

valueOf

public java.lang.Object valueOf(java.lang.String elementName)

containsElement

public boolean containsElement(java.lang.String elementName)

numberOfElements

public int numberOfElements()

type

public java.lang.Class<T> type()


Copyright © 2007-2010. All Rights Reserved.