/** * @param n index of local variable * @param c increment factor */ public IINC(final int n, final int c) { super(); // Default behaviour of LocalVariableInstruction causes error super.setOpcode(org.apache.bcel.Const.IINC); super.setLength((short) 3); setIndex(n); // May set wide as side effect setIncrement(c); }
/** * Read needed data (e.g. index) from file. */ @Override protected void initFromFile( final ByteSequence bytes, final boolean wide ) throws IOException { this.wide = wide; if (wide) { super.setLength(6); super.setIndexOnly(bytes.readUnsignedShort()); c = bytes.readShort(); } else { super.setLength(3); super.setIndexOnly(bytes.readUnsignedByte()); c = bytes.readByte(); } }