1 34 35 package org.logicalcobwebs.asm; 36 37 43 44 public class ClassAdapter implements ClassVisitor { 45 46 50 51 protected ClassVisitor cv; 52 53 58 59 public ClassAdapter (final ClassVisitor cv) { 60 this.cv = cv; 61 } 62 63 public void visit ( 64 final int access, 65 final String name, 66 final String superName, 67 final String [] interfaces, 68 final String sourceFile) 69 { 70 cv.visit(access, name, superName, interfaces, sourceFile); 71 } 72 73 public void visitInnerClass ( 74 final String name, 75 final String outerName, 76 final String innerName, 77 final int access) 78 { 79 cv.visitInnerClass(name, outerName, innerName, access); 80 } 81 82 public void visitField ( 83 final int access, 84 final String name, 85 final String desc, 86 final Object value, 87 final Attribute attrs) 88 { 89 cv.visitField(access, name, desc, value, attrs); 90 } 91 92 public CodeVisitor visitMethod ( 93 final int access, 94 final String name, 95 final String desc, 96 final String [] exceptions, 97 final Attribute attrs) 98 { 99 return new CodeAdapter(cv.visitMethod(access, name, desc, exceptions, attrs)); 100 } 101 102 public void visitAttribute (final Attribute attr) { 103 cv.visitAttribute(attr); 104 } 105 106 public void visitEnd () { 107 cv.visitEnd(); 108 } 109 } 110 | Popular Tags |