01: package com.bm.ejb3metadata.annotations.analyzer.classes;
02:
03: import org.ejb3unit.asm.Type;
04:
05: import com.bm.ejb3metadata.annotations.analyzer.AnnotationType;
06: import com.bm.ejb3metadata.annotations.analyzer.ObjectAnnotationVisitor;
07: import com.bm.ejb3metadata.annotations.metadata.ClassAnnotationMetadata;
08:
09: /**
10: * This class manages the handling of @{@link javax.ejb.RemoteHome} annotation.
11: * @author Daniel Wiese
12: */
13: public class JavaxEjbRemoteHomeVisitor extends
14: ObjectAnnotationVisitor<ClassAnnotationMetadata, Type>
15: implements AnnotationType {
16:
17: /**
18: * Type of annotation.
19: */
20: public static final String TYPE = "Ljavax/ejb/RemoteHome;";
21:
22: /**
23: * Constructor.
24: * @param classAnnotationMetadata linked to a class metadata.
25: */
26: public JavaxEjbRemoteHomeVisitor(
27: final ClassAnnotationMetadata classAnnotationMetadata) {
28: super (classAnnotationMetadata);
29: }
30:
31: /**
32: * Visits the end of the annotation. <br>
33: * Creates the object and store it.
34: */
35: @Override
36: public void visitEnd() {
37: Type t = getValue();
38: String className = t.getInternalName();
39: getAnnotationMetadata().setRemoteHome(className);
40: }
41:
42: /**
43: * @return type of the annotation (its description).
44: */
45: public String getType() {
46: return TYPE;
47: }
48:
49: }
|