01: /*
02: * Copyright (C) 2006, 2007, 2008 XStream Committers.
03: * All rights reserved.
04: *
05: * The software in this package is published under the terms of the BSD
06: * style license a copy of which has been included with this distribution in
07: * the LICENSE.txt file.
08: *
09: * Created on 02. March 2006 by Mauro Talevi
10: */
11: package com.thoughtworks.xstream.annotations;
12:
13: import java.lang.annotation.Annotation;
14: import java.lang.reflect.Field;
15:
16: /**
17: * An utility class to provide annotations from different sources
18: *
19: * @author Guilherme Silveira
20: * @deprecated since 1.3
21: */
22: @Deprecated
23: public class AnnotationProvider {
24:
25: /**
26: * Returns a field annotation based on an annotation type
27: *
28: * @param field the annotation Field
29: * @param annotationClass the annotation Class
30: * @return The Annotation type
31: * @deprecated since 1.3
32: */
33: @Deprecated
34: public <T extends Annotation> T getAnnotation(Field field,
35: Class<T> annotationClass) {
36: return field.getAnnotation(annotationClass);
37: }
38:
39: }
|