@Override public AbstractInsnNode clone(final Map<LabelNode, LabelNode> labels) { return new IntInsnNode(opcode, operand).cloneAnnotations(this); } }
public static AbstractInsnNode newIntegerNode(int i) { if (i >= -1 && i <= 5) { return new InsnNode(Opcodes.ICONST_0 + i); } else if (i >= Byte.MIN_VALUE && i <= Byte.MAX_VALUE) { return new IntInsnNode(Opcodes.BIPUSH, i); } else if (i >= Short.MIN_VALUE && i <= Short.MAX_VALUE) { return new IntInsnNode(Opcodes.SIPUSH, i); } else { return new LdcInsnNode(i); } } }
@Override public void visitIntInsn(int opcode, int operand) { node = new IntInsnNode(opcode, operand); super.visitIntInsn(opcode, operand); }
static AbstractInsnNode getIntNode(final int value) { if ( value <= 5 && -1 <= value ) return new InsnNode(ICONST_M1 + value + 1); if ( value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE ) return new IntInsnNode(BIPUSH, value); if ( value >= Short.MIN_VALUE && value <= Short.MAX_VALUE ) return new IntInsnNode(SIPUSH, value); return new LdcInsnNode(value); }
@Override public AbstractInsnNode clone(final Map<LabelNode, LabelNode> clonedLabels) { return new IntInsnNode(opcode, operand).cloneAnnotations(this); } }
@Override public void visitIntInsn(int opcode, int operand) { node = new IntInsnNode(opcode, operand); super.visitIntInsn(opcode, operand); }
public static AbstractInsnNode getNumberInsn(int number) { if (number >= -1 && number <= 5) { return new InsnNode(number + 3); } else if (number >= -128 && number <= 127) { return new IntInsnNode(Opcodes.BIPUSH, number); } else if (number >= -32768 && number <= 32767) { return new IntInsnNode(Opcodes.SIPUSH, number); } else { return new LdcInsnNode(number); } }
public CodeBlock sipush(final int shortValue) { instructionList.add(new IntInsnNode(SIPUSH, shortValue)); return this; }
public CodeBlock visitInsnNode(final int opcode, final int operand) { instructionList.add(new IntInsnNode(opcode, operand)); return this; }
public static AbstractInsnNode getPushInst(int value) { if (value >= -1 && value <= 5) return new InsnNode(ICONST_M1 + value + 1); if ((value >= -128) && (value <= 127)) return new IntInsnNode(BIPUSH, value); if ((value >= -32768) && (value <= 32767)) return new IntInsnNode(SIPUSH, value); return new LdcInsnNode(value); }
public CodeBlock visitInsnNode(final int opcode, final int operand) { instructionList.add(new IntInsnNode(opcode, operand)); return this; }
@Override public void visitIntInsn(final int opcode, final int operand) { instructions.add(new IntInsnNode(opcode, operand)); }
public void push(int bipush, int intValue, Object... comments) { // TODO: better than this stack++; addInstruction(new IntInsnNode(BIPUSH, intValue), comments); }
public CodeBlock bipush(final int byteValue) { instructionList.add(new IntInsnNode(BIPUSH, byteValue)); return this; }
public CodeBlock sipush(final int shortValue) { instructionList.add(new IntInsnNode(SIPUSH, shortValue)); return this; }
@Override public void visitIntInsn(final int opcode, final int operand) { instructions.add(new IntInsnNode(opcode, operand)); }
@Override public void visitIntInsn(int opcode, int operand) { if (fieldAccessNode != null) { instructionsAfterFieldAccess.add(new IntInsnNode(opcode, operand)); } super.visitIntInsn(opcode, operand); }
public CodeBlock newarray(final int size) { instructionList.add(new IntInsnNode(NEWARRAY, size)); return this; }
@Override public void visitIntInsn(int arg0, int arg1) { super.visitIntInsn(arg0, arg1); appendToBacklog(new IntInsnNode(arg0, arg1)); }
@Override public void visitIntInsn(int arg0, int arg1) { super.visitIntInsn(arg0, arg1); appendToBacklog(new IntInsnNode(arg0, arg1)); }