1 30 31 package oracle.toplink.libraries.asm; 32 33 41 42 public class CodeAdapter implements CodeVisitor { 43 44 47 48 protected CodeVisitor cv; 49 50 55 56 public CodeAdapter (final CodeVisitor cv) { 57 this.cv = cv; 58 } 59 60 public void visitInsn (final int opcode) { 61 cv.visitInsn(opcode); 62 } 63 64 public void visitIntInsn (final int opcode, final int operand) { 65 cv.visitIntInsn(opcode, operand); 66 } 67 68 public void visitVarInsn (final int opcode, final int var) { 69 cv.visitVarInsn(opcode, var); 70 } 71 72 public void visitTypeInsn (final int opcode, final String desc) { 73 cv.visitTypeInsn(opcode, desc); 74 } 75 76 public void visitFieldInsn ( 77 final int opcode, 78 final String owner, 79 final String name, 80 final String desc) 81 { 82 cv.visitFieldInsn(opcode, owner, name, desc); 83 } 84 85 public void visitMethodInsn ( 86 final int opcode, 87 final String owner, 88 final String name, 89 final String desc) 90 { 91 cv.visitMethodInsn(opcode, owner, name, desc); 92 } 93 94 public void visitJumpInsn (final int opcode, final Label label) { 95 cv.visitJumpInsn(opcode, label); 96 } 97 98 public void visitLabel (final Label label) { 99 cv.visitLabel(label); 100 } 101 102 public void visitLdcInsn (final Object cst) { 103 cv.visitLdcInsn(cst); 104 } 105 106 public void visitIincInsn (final int var, final int increment) { 107 cv.visitIincInsn(var, increment); 108 } 109 110 public void visitTableSwitchInsn ( 111 final int min, 112 final int max, 113 final Label dflt, 114 final Label labels[]) 115 { 116 cv.visitTableSwitchInsn(min, max, dflt, labels); 117 } 118 119 public void visitLookupSwitchInsn ( 120 final Label dflt, 121 final int keys[], 122 final Label labels[]) 123 { 124 cv.visitLookupSwitchInsn(dflt, keys, labels); 125 } 126 127 public void visitMultiANewArrayInsn (final String desc, final int dims) { 128 cv.visitMultiANewArrayInsn(desc, dims); 129 } 130 131 public void visitTryCatchBlock ( 132 final Label start, 133 final Label end, 134 final Label handler, 135 final String type) 136 { 137 cv.visitTryCatchBlock(start, end, handler, type); 138 } 139 140 public void visitMaxs (final int maxStack, final int maxLocals) { 141 cv.visitMaxs(maxStack, maxLocals); 142 } 143 144 public void visitLocalVariable ( 145 final String name, 146 final String desc, 147 final Label start, 148 final Label end, 149 final int index) 150 { 151 cv.visitLocalVariable(name, desc, start, end, index); 152 } 153 154 public void visitLineNumber (final int line, final Label start) { 155 cv.visitLineNumber(line, start); 156 } 157 158 public void visitAttribute (final Attribute attr) { 159 cv.visitAttribute(attr); 160 } 161 } 162 | Popular Tags |