org.objectweb.easybeans.deployment.annotations.analyzer
Class ScanFieldVisitor

java.lang.Object
  extended by org.objectweb.asm.commons.EmptyVisitor
      extended by org.objectweb.easybeans.deployment.annotations.analyzer.ScanFieldVisitor
All Implemented Interfaces:
org.objectweb.asm.AnnotationVisitor, org.objectweb.asm.ClassVisitor, org.objectweb.asm.FieldVisitor, org.objectweb.asm.MethodVisitor

public class ScanFieldVisitor
extends org.objectweb.asm.commons.EmptyVisitor
implements org.objectweb.asm.FieldVisitor

This classes analyses a given field and build/fill meta data information.

Author:
Florent Benoit

Field Summary
private  ClassAnnotationMetadata classAnnotationMetadata
          Parent of field annotation meta data that are built by this visitor.
private  org.objectweb.asm.commons.EmptyVisitor emptyVisitor
          Annotation visitor which do nothing.
private  FieldAnnotationMetadata fieldAnnotationMetadata
          Class generated by the visitor which correspond to meta data contained in the parsed field.
private  java.util.Map<java.lang.String,org.objectweb.asm.AnnotationVisitor> fieldAnnotationVisitors
          Map of annotation visitors used by this visitor.
The key is the annotation descriptor (asm)
 
Constructor Summary
ScanFieldVisitor(JField jField, ClassAnnotationMetadata classAnnotationMetadata)
          Constructor.
 
Method Summary
private  void initVisitors()
          Build visitors used by this one.
 org.objectweb.asm.AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
          Visits an annotation of the field.
 void visitEnd()
          Visits the end of the method.
 
Methods inherited from class org.objectweb.asm.commons.EmptyVisitor
visit, visit, visitAnnotation, visitAnnotationDefault, visitArray, visitAttribute, visitCode, visitEnum, visitField, visitFieldInsn, visitIincInsn, visitInnerClass, visitInsn, visitIntInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLookupSwitchInsn, visitMaxs, visitMethod, visitMethodInsn, visitMultiANewArrayInsn, visitOuterClass, visitParameterAnnotation, visitSource, visitTableSwitchInsn, visitTryCatchBlock, visitTypeInsn, visitVarInsn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.asm.FieldVisitor
visitAttribute
 

Field Detail

emptyVisitor

private org.objectweb.asm.commons.EmptyVisitor emptyVisitor
Annotation visitor which do nothing.


fieldAnnotationMetadata

private FieldAnnotationMetadata fieldAnnotationMetadata
Class generated by the visitor which correspond to meta data contained in the parsed field.


fieldAnnotationVisitors

private java.util.Map<java.lang.String,org.objectweb.asm.AnnotationVisitor> fieldAnnotationVisitors
Map of annotation visitors used by this visitor.
The key is the annotation descriptor (asm)


classAnnotationMetadata

private ClassAnnotationMetadata classAnnotationMetadata
Parent of field annotation meta data that are built by this visitor.

Constructor Detail

ScanFieldVisitor

public ScanFieldVisitor(JField jField,
                        ClassAnnotationMetadata classAnnotationMetadata)
Constructor.

Parameters:
jField - field object on which we set meta data.
classAnnotationMetadata - the parent object on which add generated meta-data.
Method Detail

initVisitors

private void initVisitors()
Build visitors used by this one.


visitAnnotation

public org.objectweb.asm.AnnotationVisitor visitAnnotation(java.lang.String desc,
                                                           boolean visible)
Visits an annotation of the field.

Specified by:
visitAnnotation in interface org.objectweb.asm.ClassVisitor
Specified by:
visitAnnotation in interface org.objectweb.asm.FieldVisitor
Specified by:
visitAnnotation in interface org.objectweb.asm.MethodVisitor
Overrides:
visitAnnotation in class org.objectweb.asm.commons.EmptyVisitor
Parameters:
desc - the class descriptor of the annotation class.
visible - true if the annotation is visible at runtime.
Returns:
a non null visitor to visit the annotation values.

visitEnd

public void visitEnd()
Visits the end of the method. This method, which is the last one to be called, is used to inform the visitor that all the annotations and attributes of the method have been visited.

Specified by:
visitEnd in interface org.objectweb.asm.AnnotationVisitor
Specified by:
visitEnd in interface org.objectweb.asm.ClassVisitor
Specified by:
visitEnd in interface org.objectweb.asm.FieldVisitor
Specified by:
visitEnd in interface org.objectweb.asm.MethodVisitor
Overrides:
visitEnd in class org.objectweb.asm.commons.EmptyVisitor