01: package com.bm.ejb3metadata.annotations.analyzer;
02:
03: import org.ejb3unit.asm.AnnotationVisitor;
04:
05: /**
06: * This class manages the handling of enum values.
07: * @param <T> the ClassAnnotationMetadata or MethodAnnotationMetadata.
08: * @author Daniel Wiese
09: */
10: public abstract class EnumAnnotationVisitor<T> extends
11: AbsAnnotationVisitor<T> implements AnnotationVisitor,
12: AnnotationType {
13:
14: /**
15: * Value.
16: */
17: private String value = null;
18:
19: /**
20: * Constructor.
21: * @param annotationMetadata linked to a <T> metadata.
22: */
23: public EnumAnnotationVisitor(final T annotationMetadata) {
24: super (annotationMetadata);
25: }
26:
27: /**
28: * Visits an enumeration value of the annotation.
29: * @param name the value name.
30: * @param desc the class descriptor of the enumeration class.
31: * @param value the actual enumeration value.
32: */
33: @Override
34: public void visitEnum(final String name, final String desc,
35: final String value) {
36: this .value = value;
37: }
38:
39: /**
40: * @return value of the object
41: */
42: public String getValue() {
43: return this.value;
44: }
45:
46: }
|