com.bm.ejb3metadata.annotations.analyzer
Class AbsAnnotationVisitor<T>

java.lang.Object
  extended by com.bm.ejb3metadata.annotations.analyzer.AbsAnnotationVisitor<T>
Type Parameters:
T - a metadata object.
All Implemented Interfaces:
AnnotationType, org.ejb3unit.asm.jar.AnnotationVisitor
Direct Known Subclasses:
AbsCommonEjbVisitor, EnumAnnotationVisitor, JavaxAnnotationPostConstructVisitor, JavaxAnnotationPreDestroyVisitor, JavaxAnnotationResourceVisitor, JavaxEjbEJBVisitor, JavaxEjbPostActivateVisitor, JavaxEjbPrePassivateVisitor, JavaxEjbTimeoutVisitor, JavaxInterceptorAroundInvokeVisitor, JavaxInterceptorExcludeClassInterceptorsVisitor, JavaxPersistencePersistenceContextVisitor, JavaxPersistencePersistenceUnitVisitor, ObjectAnnotationVisitor, ObjectArrayAnnotationVisitor

public abstract class AbsAnnotationVisitor<T>
extends java.lang.Object
implements org.ejb3unit.asm.jar.AnnotationVisitor, AnnotationType

This class manages the setter/getter of annotation visitor.

Author:
Daniel Wiese

Constructor Summary
AbsAnnotationVisitor()
          Constructor (default).
AbsAnnotationVisitor(T annotationMetadata)
          Constructor.
 
Method Summary
 T getAnnotationMetadata()
          class/method metadata.
 void visit(java.lang.String name, java.lang.Object value)
          Visits a primitive value of the annotation.
 org.ejb3unit.asm.jar.AnnotationVisitor visitAnnotation(java.lang.String name, java.lang.String desc)
          Visits a nested annotation value of the annotation.
 org.ejb3unit.asm.jar.AnnotationVisitor visitArray(java.lang.String name)
          Visits an array value of the annotation.
abstract  void visitEnd()
          Visits the end of the annotation.
 void visitEnum(java.lang.String name, java.lang.String desc, java.lang.String value)
          Visits an enumeration value of the annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bm.ejb3metadata.annotations.analyzer.AnnotationType
getType
 

Constructor Detail

AbsAnnotationVisitor

public AbsAnnotationVisitor()
Constructor (default).


AbsAnnotationVisitor

public AbsAnnotationVisitor(T annotationMetadata)
Constructor.

Parameters:
annotationMetadata - linked to an annotation metadata
Method Detail

visit

public void visit(java.lang.String name,
                  java.lang.Object value)
Visits a primitive value of the annotation.

Specified by:
visit in interface org.ejb3unit.asm.jar.AnnotationVisitor
Parameters:
name - the value name.
value - the actual value, whose type must be Byte, Boolean, Character, Short, Integer, Long, Float, Double, String or org.ejb3unit.asm.Type.

visitEnum

public void visitEnum(java.lang.String name,
                      java.lang.String desc,
                      java.lang.String value)
Visits an enumeration value of the annotation.

Specified by:
visitEnum in interface org.ejb3unit.asm.jar.AnnotationVisitor
Parameters:
name - the value name.
desc - the class descriptor of the enumeration class.
value - the actual enumeration value.

visitAnnotation

public org.ejb3unit.asm.jar.AnnotationVisitor visitAnnotation(java.lang.String name,
                                                              java.lang.String desc)
Visits a nested annotation value of the annotation.

Specified by:
visitAnnotation in interface org.ejb3unit.asm.jar.AnnotationVisitor
Parameters:
name - the value name.
desc - the class descriptor of the nested annotation class.
Returns:
a non null visitor to visit the actual nested annotation value. The nested annotation value must be fully visited before calling other methods on this annotation visitor.

visitArray

public org.ejb3unit.asm.jar.AnnotationVisitor visitArray(java.lang.String name)
Visits an array value of the annotation.

Specified by:
visitArray in interface org.ejb3unit.asm.jar.AnnotationVisitor
Parameters:
name - the value name.
Returns:
a non null visitor to visit the actual array value elements. The 'name' parameters passed to the methods of this visitor are ignored. All the array values must be visited before calling other methods on this annotation visitor.

visitEnd

public abstract void visitEnd()
Visits the end of the annotation.

Specified by:
visitEnd in interface org.ejb3unit.asm.jar.AnnotationVisitor

getAnnotationMetadata

public T getAnnotationMetadata()
class/method metadata.

Returns:
class/method metadata


Copyright © 2008. All Rights Reserved.