/** * Dump instruction as byte code to stream out. * @param out Output stream */ @Override public void dump( final DataOutputStream out ) throws IOException { if (wide) { out.writeByte(org.apache.bcel.Const.WIDE); } out.writeByte(super.getOpcode()); if (wide) { out.writeShort(super.getIndex()); out.writeShort(c); } else { out.writeByte(super.getIndex()); out.writeByte(c); } }
public void visitLocalVariableInstruction(LocalVariableInstruction i) { short opcode = i.getOpcode(); Type type = i.getType(_cp); if(opcode == Constants.IINC) { _out.println("il.append(new IINC(" + i.getIndex() + ", " + ((IINC)i).getIncrement() + "));"); } else { String kind = (opcode < Constants.ISTORE)? "Load" : "Store"; _out.println("il.append(_factory.create" + kind + "(" + BCELifier.printType(type) + ", " + i.getIndex() + "));"); } }
@Override public void visitLocalVariableInstruction( final LocalVariableInstruction i ) { final short opcode = i.getOpcode(); final Type type = i.getType(_cp); if (opcode == Const.IINC) { _out.println("il.append(new IINC(" + i.getIndex() + ", " + ((IINC) i).getIncrement() + "));"); } else { final String kind = (opcode < Const.ISTORE) ? "Load" : "Store"; _out.println("il.append(_factory.create" + kind + "(" + BCELifier.printType(type) + ", " + i.getIndex() + "));"); } }