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