View Javadoc
1 package junit.quilt.cover.generic; 2 3 import org.apache.commons.graph.*; 4 import org.apache.bcel.generic.*; 5 import junit.quilt.exception.InvalidTransitionException; 6 7 public abstract class FlowControlEdge 8 implements Edge 9 { 10 private BlockVertex source = null; 11 private BlockVertex target = null; 12 private int weight = 1; 13 14 public FlowControlEdge() { 15 } 16 17 public FlowControlEdge(BlockVertex source, 18 BlockVertex target) { 19 this.source = source; 20 this.target = target; 21 } 22 23 public FlowControlEdge(int weight, 24 BlockVertex source, 25 BlockVertex target) { 26 this.weight = weight; 27 this.source = source; 28 this.target = target; 29 } 30 31 public void setSource( BlockVertex source ) { 32 this.source = source; 33 } 34 35 public void setTarget( BlockVertex target ) { 36 this.target = target; 37 } 38 39 public BlockVertex getSource() { 40 return source; 41 } 42 43 public BlockVertex getTarget() { 44 return target; 45 } 46 47 public abstract void connect( MethodGen method, 48 InstructionList il, 49 InstructionHandle source, 50 InstructionHandle target ) 51 throws InvalidTransitionException; 52 53 /*** 54 * This should work like clone, but it returns 55 * a FlowControlEdge. All edges must implement 56 * this, otherwise the JSRInliner will not work. 57 * 58 * As the Vertices are "copy"ed as well, we need 59 * to provide them too. 60 */ 61 public abstract FlowControlEdge copy( BlockVertex source, 62 BlockVertex target); 63 } 64 65 66 67 68 69 70

This page was automatically generated by Maven