public class CAstControlFlowRecorder extends Object implements CAstControlFlowMap
EXCEPTION_TO_EXIT, SWITCH_DEFAULT
Constructor and Description |
---|
CAstControlFlowRecorder(CAstSourcePositionMap src) |
Modifier and Type | Method and Description |
---|---|
void |
add(Object from,
Object to,
Object label)
Add a control-flow edge from the `from' node to the `to' node with the
(possibly null) label `label'.
|
void |
addAll(CAstControlFlowMap other) |
Collection<CAstNode> |
getMappedNodes()
Returns an iterator of all CAstNodes for which this map contains control
flow mapping information.
|
Collection |
getSourceNodes(CAstNode to)
Return a collection of control-flow ast nodes that have this one as a
possible target.
|
CAstNode |
getTarget(CAstNode from,
Object label)
Return the target ast node of the control-flow instruction denoted by from
with respect to the given label.
|
Collection<Object> |
getTargetLabels(CAstNode from)
Return a collection of all labels for which the control-flow ast node
from has a target. |
boolean |
isMapped(Object node) |
void |
map(Object node,
CAstNode ast)
Establish a mapping between some object `node' and the ast node `ast'.
|
String |
toString() |
public CAstControlFlowRecorder(CAstSourcePositionMap src)
public CAstNode getTarget(CAstNode from, Object label)
CAstControlFlowMap
getTarget
in interface CAstControlFlowMap
public Collection<Object> getTargetLabels(CAstNode from)
CAstControlFlowMap
from
has a target.getTargetLabels
in interface CAstControlFlowMap
public Collection getSourceNodes(CAstNode to)
CAstControlFlowMap
getSourceNodes
in interface CAstControlFlowMap
public Collection<CAstNode> getMappedNodes()
CAstControlFlowMap
getMappedNodes
in interface CAstControlFlowMap
public void add(Object from, Object to, Object label)
public void map(Object node, CAstNode ast)
public void addAll(CAstControlFlowMap other)
public boolean isMapped(Object node)