View Javadoc
1 package net.sf.cglib.transform; 2 3 import org.objectweb.asm.*; 4 5 public class ClassTransformerChain extends AbstractClassTransformer { 6 private ClassTransformer[] chain; 7 8 public ClassTransformerChain(ClassTransformer[] chain) { 9 this.chain = (ClassTransformer[])chain.clone(); 10 } 11 12 public void setTarget(ClassVisitor v) { 13 super.setTarget(chain[0]); 14 ClassVisitor next = v; 15 for (int i = chain.length - 1; i >= 0; i--) { 16 chain[i].setTarget(next); 17 next = chain[i]; 18 } 19 } 20 21 public String toString() { 22 StringBuffer sb = new StringBuffer(); 23 sb.append("TransformerChain{"); 24 for (int i = 0; i < chain.length; i++) { 25 if (i > 0) { 26 sb.append(", "); 27 } 28 sb.append(chain[i].toString()); 29 } 30 sb.append("}"); 31 return sb.toString(); 32 } 33 }

This page was automatically generated by Maven