1 5 package de.uka.ipd.coverage.natures.all_uses; 6 7 import java.util.ArrayList ; 8 import java.util.List ; 9 10 import org.apache.bcel.classfile.ConstantPool; 11 12 16 class PhiFunction extends PhiDashFunction { 17 18 private List predecessorsIndizes = new ArrayList (); 19 21 25 public PhiFunction(int originalIndex) { 26 super(originalIndex); 27 } 28 29 33 public PhiFunction(PhiDashFunction original) { 34 super(original.getOriginalIndex()); 35 setVariable(original.getLocalVariable()); 36 } 37 38 42 public void addPredecessorIndex(int index) { 43 Integer newIndex = new Integer (index); 44 if (!predecessorsIndizes.contains(newIndex)) { 45 this.predecessorsIndizes.add(newIndex); 46 } 47 } 48 49 public Integer [] getPredecessorIndices() { 50 return (Integer []) predecessorsIndizes.toArray( 51 new Integer [predecessorsIndizes.size()]); 52 } 53 56 public String toString() { 57 return "implement me: PhiFunction.toString()"; } 59 60 61 public String toString(ConstantPool arg0) { 62 return "implement me: PhiFunction.toString()"; } 64 } 65 | Popular Tags |