// 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(); } } }
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; }