View Javadoc
1 /*** 2 * InitVertex 3 * 4 * This is a subclass of BlockVertex 5 * which contains the code for initializing 6 * the state machine. 7 */ 8 9 package junit.quilt.cover.state; 10 11 import junit.quilt.cover.generic.*; 12 import org.apache.bcel.generic.*; 13 14 public class InitVertex 15 extends junit.quilt.cover.generic.InitVertex 16 { 17 private InstructionList init = new InstructionList(); 18 19 public InitVertex( int fieldVar, 20 int fieldRef, 21 int startRef ) { 22 InstructionList end = new InstructionList( new LabeledNOP("END SM INIT")); 23 InstructionList clean = new InstructionList( new ACONST_NULL() ); 24 clean.append( new ASTORE( fieldVar )); 25 26 init.append( new GETSTATIC( fieldRef )); // MSM 27 init.append( new GETSTATIC( fieldRef )); // MSM, MSM 28 init.append( new ASTORE( fieldVar )); // MSM 29 init.append( new IFNULL( end.getStart() )); // 30 init.append( new GETSTATIC( fieldRef )); // MSM 31 init.append( new INVOKEVIRTUAL( startRef )); // 32 init.append( end ); 33 34 setInstructionList( init ); 35 } 36 37 public String toString() { 38 return "[INIT SM]"; 39 } 40 } 41 42 43 44

This page was automatically generated by Maven