View Javadoc
1 package junit.quilt.cover.ball94; 2 3 import junit.quilt.cover.generic.*; 4 import org.apache.bcel.generic.*; 5 6 7 public class ArrayIncrement 8 extends BlockVertex 9 { 10 private short pos = -1; 11 12 public ArrayIncrement( int fieldVar, short pos ) { 13 this.pos = pos; 14 15 InstructionList end = new InstructionList(); 16 end.append( new NOP() ); 17 18 InstructionList impl = new InstructionList(); 19 20 impl.append( new GETSTATIC( fieldVar ) ); // DAT 21 impl.append( new IFNULL( end.getStart())); // 22 impl.append( new GETSTATIC( fieldVar ) ); // DAT 23 impl.append( new SIPUSH( pos ) ); // DAT, POS 24 impl.append( new GETSTATIC( fieldVar ) ); // DAT, POS, DAT 25 impl.append( new SIPUSH( pos ) ); // DAT, POS, DAT, POS 26 impl.append( new IALOAD() ); // DAT, POS, VAL 27 impl.append( new ICONST(1)); // DAT, POS, VAL, 1 28 impl.append( new IADD() ); // DAT, POS, VAL + 1 29 impl.append( new IASTORE() ); 30 31 impl.append( end ); 32 33 setInstructionList( impl ); 34 } 35 36 public String toString() { 37 return "[ARR INC: " + pos + "]"; 38 } 39 }

This page was automatically generated by Maven