1 25 26 package org.objectweb.easybeans.deployment.annotations.analyzer; 27 28 import org.objectweb.asm.FieldVisitor; 29 import org.objectweb.easybeans.deployment.annotations.JField; 30 import org.objectweb.easybeans.deployment.annotations.metadata.ClassAnnotationMetadata; 31 import org.objectweb.easybeans.deployment.annotations.metadata.FieldAnnotationMetadata; 32 33 37 public class ScanFieldVisitor extends ScanCommonVisitor<FieldAnnotationMetadata> implements FieldVisitor { 38 39 40 43 private FieldAnnotationMetadata fieldAnnotationMetadata = null; 44 45 46 49 private ClassAnnotationMetadata classAnnotationMetadata = null; 50 51 56 public ScanFieldVisitor(final JField jField, final ClassAnnotationMetadata classAnnotationMetadata) { 57 58 this.fieldAnnotationMetadata = new FieldAnnotationMetadata(jField, classAnnotationMetadata); 60 61 this.classAnnotationMetadata = classAnnotationMetadata; 63 64 initVisitors(); 66 } 67 68 71 private void initVisitors() { 72 super.initVisitors(fieldAnnotationMetadata); 73 74 } 75 76 81 @Override 82 public void visitEnd() { 83 classAnnotationMetadata.addFieldAnnotationMetadata(fieldAnnotationMetadata); 84 } 85 86 } 87 | Popular Tags |