01: package org.vraptor.component;
02:
03: import java.lang.annotation.Annotation;
04: import java.lang.reflect.Field;
05:
06: /**
07: * Represents a field annotated.
08: *
09: * @author Guilherme Silveira
10: * @param <T>
11: * the type of annotation which shall be used
12: */
13: public class FieldAnnotation<T extends Annotation> {
14:
15: private final T annotation;
16:
17: private final Field field;
18:
19: public FieldAnnotation(T annotation, Field field) {
20: this .annotation = annotation;
21: this .field = field;
22: }
23:
24: /**
25: * @return Returns the annotation.
26: */
27: public T getAnnotation() {
28: return this .annotation;
29: }
30:
31: /**
32: * @return Returns the field.
33: */
34: public Field getField() {
35: return this.field;
36: }
37:
38: }
|