1 2 package org.quilt.cover.stmt; 3 4 import org.apache.bcel.generic.*; 5 import org.quilt.cl.*; 6 import org.quilt.graph.*; 7 8 20 public class CounterVertex extends CodeVertex { 21 22 28 public CounterVertex (ControlFlowGraph g) { 29 super(g); 30 } 31 37 public CounterVertex (ControlFlowGraph g, String lbl) { 38 this(g); 39 label_ = lbl; 40 } 41 42 47 public String toString () { 48 StringBuffer sb = new StringBuffer ().append("Counter ") 49 .append(getGraph().getIndex()) 50 .append(":").append(getIndex()); 51 if (label_ != null) { 52 sb.append(" {").append(label_).append("}"); 53 } 54 return sb.toString(); 55 } 56 60 public String toString (boolean b) { 61 62 StringBuffer sb = new StringBuffer ().append(toString()); 63 if (b) { 64 sb.append("\n ilist: "); 65 InstructionHandle ih = ilist.getStart(); 66 while ( ih != null) { 67 sb.append(ih.getInstruction()); 68 } 69 } 70 return sb.toString(); 71 } 72 } 73 | Popular Tags |