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