1 30 package org.objectweb.asm.tree; 31 32 import org.objectweb.asm.MethodVisitor; 33 34 39 public class InsnNode extends AbstractInsnNode { 40 41 private final static InsnNode[] INSNS; 42 43 static { 44 INSNS = new InsnNode[255]; 45 for (int i = 0; i < INSNS.length; ++i) { 46 INSNS[i] = new InsnNode(i); 47 } 48 } 49 50 58 public final static InsnNode getByOpcode(final int opcode) { 59 return INSNS[opcode]; 60 } 61 62 80 public InsnNode(final int opcode) { 81 super(opcode); 82 } 83 84 89 public void accept(final MethodVisitor mv) { 90 mv.visitInsn(opcode); 91 } 92 93 public int getType() { 94 return INSN; 95 } 96 } 97 | Popular Tags |