1 30 package org.objectweb.asm; 31 32 39 public class ClassAdapter implements ClassVisitor { 40 41 44 protected ClassVisitor cv; 45 46 51 public ClassAdapter(final ClassVisitor cv) { 52 this.cv = cv; 53 } 54 55 public void visit( 56 final int version, 57 final int access, 58 final String name, 59 final String signature, 60 final String superName, 61 final String [] interfaces) 62 { 63 cv.visit(version, access, name, signature, superName, interfaces); 64 } 65 66 public void visitSource(final String source, final String debug) { 67 cv.visitSource(source, debug); 68 } 69 70 public void visitOuterClass( 71 final String owner, 72 final String name, 73 final String desc) 74 { 75 cv.visitOuterClass(owner, name, desc); 76 } 77 78 public AnnotationVisitor visitAnnotation( 79 final String desc, 80 final boolean visible) 81 { 82 return cv.visitAnnotation(desc, visible); 83 } 84 85 public void visitAttribute(final Attribute attr) { 86 cv.visitAttribute(attr); 87 } 88 89 public void visitInnerClass( 90 final String name, 91 final String outerName, 92 final String innerName, 93 final int access) 94 { 95 cv.visitInnerClass(name, outerName, innerName, access); 96 } 97 98 public FieldVisitor visitField( 99 final int access, 100 final String name, 101 final String desc, 102 final String signature, 103 final Object value) 104 { 105 return cv.visitField(access, name, desc, signature, value); 106 } 107 108 public MethodVisitor visitMethod( 109 final int access, 110 final String name, 111 final String desc, 112 final String signature, 113 final String [] exceptions) 114 { 115 return new MethodAdapter(cv.visitMethod(access, 116 name, 117 desc, 118 signature, 119 exceptions)); 120 } 121 122 public void visitEnd() { 123 cv.visitEnd(); 124 } 125 } 126 | Popular Tags |