1 16 package net.sf.cglib.transform; 17 18 import org.objectweb.asm.AnnotationVisitor; 19 import org.objectweb.asm.Attribute; 20 import org.objectweb.asm.FieldVisitor; 21 22 public class FieldVisitorTee implements FieldVisitor { 23 private FieldVisitor fv1, fv2; 24 25 public FieldVisitorTee(FieldVisitor fv1, FieldVisitor fv2) { 26 this.fv1 = fv1; 27 this.fv2 = fv2; 28 } 29 30 public AnnotationVisitor visitAnnotation(String desc, boolean visible) { 31 return AnnotationVisitorTee.getInstance(fv1.visitAnnotation(desc, visible), 32 fv2.visitAnnotation(desc, visible)); 33 } 34 35 public void visitAttribute(Attribute attr) { 36 fv1.visitAttribute(attr); 37 fv2.visitAttribute(attr); 38 } 39 40 public void visitEnd() { 41 fv1.visitEnd(); 42 fv2.visitEnd(); 43 } 44 } 45 46 | Popular Tags |