org.objectweb.easybeans.deployment.annotations.analyzer.classes
Class JavaxPersistencePersistenceContextsVisitor

java.lang.Object
  extended by org.objectweb.easybeans.deployment.annotations.analyzer.AbsAnnotationVisitor<T>
      extended by org.objectweb.easybeans.deployment.annotations.analyzer.JavaxPersistencePersistenceContextVisitor<ClassAnnotationMetadata>
          extended by org.objectweb.easybeans.deployment.annotations.analyzer.classes.JavaxPersistencePersistenceContextsVisitor
All Implemented Interfaces:
org.objectweb.asm.AnnotationVisitor, AnnotationType

public class JavaxPersistencePersistenceContextsVisitor
extends JavaxPersistencePersistenceContextVisitor<ClassAnnotationMetadata>

This class manages the handling of @PersistenceContexts annotation.

Author:
Florent Benoit

Field Summary
private  boolean isAdded
          Object is added to the list.
private  java.util.List<JavaxPersistenceContext> javaxPersistenceContexts
          List of JavaxPersistenceContext object.
static java.lang.String TYPE
          Type of annotation.
 
Constructor Summary
JavaxPersistencePersistenceContextsVisitor(ClassAnnotationMetadata annotationMetadata)
          Constructor.
 
Method Summary
 java.lang.String getType()
           
 void visit(java.lang.String name, java.lang.Object value)
          Visits a primitive value of the annotation.
 void visitEnd()
          Visits the end of the annotation.
 
Methods inherited from class org.objectweb.easybeans.deployment.annotations.analyzer.JavaxPersistencePersistenceContextVisitor
getJavaxPersistenceContext, setJavaxPersistenceContext, visitEnum
 
Methods inherited from class org.objectweb.easybeans.deployment.annotations.analyzer.AbsAnnotationVisitor
getAnnotationMetadata, visitAnnotation, visitArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final java.lang.String TYPE
Type of annotation.

See Also:
Constant Field Values

javaxPersistenceContexts

private java.util.List<JavaxPersistenceContext> javaxPersistenceContexts
List of JavaxPersistenceContext object.


isAdded

private boolean isAdded
Object is added to the list.

Constructor Detail

JavaxPersistencePersistenceContextsVisitor

public JavaxPersistencePersistenceContextsVisitor(ClassAnnotationMetadata annotationMetadata)
Constructor.

Parameters:
annotationMetadata - linked to a class or method 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.objectweb.asm.AnnotationVisitor
Overrides:
visit in class JavaxPersistencePersistenceContextVisitor<ClassAnnotationMetadata>
Parameters:
name - the value name.
value - the actual value, whose type must be Byte, Boolean, Character, Short, Integer, Long, Float, Double, String or Type.

visitEnd

public void visitEnd()
Visits the end of the annotation.
Creates the object and store it.

Specified by:
visitEnd in interface org.objectweb.asm.AnnotationVisitor
Overrides:
visitEnd in class JavaxPersistencePersistenceContextVisitor<ClassAnnotationMetadata>

getType

public java.lang.String getType()
Specified by:
getType in interface AnnotationType
Overrides:
getType in class JavaxPersistencePersistenceContextVisitor<ClassAnnotationMetadata>
Returns:
type of the annotation (its description)