Package com.ibm.wala.cast.tree
Interface CAstControlFlowMap
-
- All Known Implementing Classes:
CAstControlFlowRecorder
public interface CAstControlFlowMap
The control flow information for the CAPA AST of a particular entity. An ast may contain various nodes that pertain to control flow---such as gotos, branches, exceptions and so on---and this map denotes the target ast nodes of ast nodes that are control flow instructions. The label is fairly arbitrary---it will depend on the language, producers and consumers of the tree---but is generally expected to be things like case labels, exception types, conditional outcomes and so on.
-
-
Field Summary
Fields Modifier and Type Field Description static CAstNode
EXCEPTION_TO_EXIT
A distinguished target that means this control flow is the target of an uncaught exception.static Object
SWITCH_DEFAULT
A distinguished label that means this control flow is the default target of a switch (or case) statement as found in many procedural languages.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 nodefrom
has a target.
-
-
-
Field Detail
-
SWITCH_DEFAULT
static final Object SWITCH_DEFAULT
A distinguished label that means this control flow is the default target of a switch (or case) statement as found in many procedural languages.
-
EXCEPTION_TO_EXIT
static final CAstNode EXCEPTION_TO_EXIT
A distinguished target that means this control flow is the target of an uncaught exception.
-
-
Method Detail
-
getTarget
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.
-
getTargetLabels
Collection<Object> getTargetLabels(CAstNode from)
Return a collection of all labels for which the control-flow ast nodefrom
has a target.
-
getSourceNodes
Collection getSourceNodes(CAstNode to)
Return a collection of control-flow ast nodes that have this one as a possible target.
-
getMappedNodes
Collection<CAstNode> getMappedNodes()
Returns an iterator of all CAstNodes for which this map contains control flow mapping information.
-
-