View Javadoc
1 package net.sf.cglib.transform; 2 3 import org.objectweb.asm.*; 4 5 public class MethodFilterTransformer extends AbstractClassTransformer { 6 private MethodFilter filter; 7 private ClassTransformer pass; 8 private ClassVisitor direct; 9 10 public MethodFilterTransformer(MethodFilter filter, ClassTransformer pass) { 11 this.filter = filter; 12 this.pass = pass; 13 super.setTarget(pass); 14 } 15 16 public CodeVisitor visitMethod(int access, String name, String desc, String[] exceptions, Attribute attrs) { 17 return (filter.accept(access, name, desc, exceptions, attrs) ? pass : direct).visitMethod(access, name, desc, exceptions, attrs); 18 } 19 20 public void setTarget(ClassVisitor target) { 21 pass.setTarget(target); 22 direct = target; 23 } 24 }

This page was automatically generated by Maven