Esempio n. 1
0
 // removes the edge coming in from the given predecessor
 public void removeInEdge(CfgNode predecessor) {
   for (Iterator iter = this.inEdges.iterator(); iter.hasNext(); ) {
     CfgEdge inEdge = (CfgEdge) iter.next();
     if (inEdge.getSource() == predecessor) {
       iter.remove();
     }
   }
 }
Esempio n. 2
0
 public List<CfgNode> getPredecessors() {
   List<CfgNode> predecessors = new LinkedList<CfgNode>();
   for (Iterator iter = this.inEdges.iterator(); iter.hasNext(); ) {
     CfgEdge inEdge = (CfgEdge) iter.next();
     predecessors.add(inEdge.getSource());
   }
   return predecessors;
 }