com.thoughtworks.xstream.annotations
Class AnnotationProvider

java.lang.Object
  extended by com.thoughtworks.xstream.annotations.AnnotationProvider

public class AnnotationProvider
extends java.lang.Object

An utility class to provide annotions from different sources

Author:
Guilherme Silveira

Constructor Summary
AnnotationProvider()
           
 
Method Summary
<T extends java.lang.annotation.Annotation>
T
getAnnotation(java.lang.reflect.Field field, java.lang.Class<T> annotationClass)
          Returns a field annotation based on an annotation type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationProvider

public AnnotationProvider()
Method Detail

getAnnotation

public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.reflect.Field field,
                                                                   java.lang.Class<T> annotationClass)
Returns a field annotation based on an annotation type

Parameters:
field - the annotation Field
annotationClass - the annotation Class
Returns:
The Annotation type


Joe Walnes, http://xstream.codehaus.org/