|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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 | |
|---|---|
static CAstNode |
EXCEPTION_TO_EXIT
A distinguished target that means this control flow is the target of an uncaught exception. |
static java.lang.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 | |
|---|---|
java.util.Collection<CAstNode> |
getMappedNodes()
Returns an iterator of all CAstNodes for which this map contains control flow mapping information. |
java.util.Collection |
getSourceNodes(CAstNode to)
Return a collection of control-flow ast nodes that have this one as a possible target. |
CAstNode |
getTarget(CAstNode from,
java.lang.Object label)
Return the target ast node of the control-flow instruction denoted by from with respect to the given label. |
java.util.Collection |
getTargetLabels(CAstNode from)
Return a collection of all labels for which the control-flow ast node from has a target. |
| Field Detail |
|---|
static final java.lang.Object SWITCH_DEFAULT
static final CAstNode EXCEPTION_TO_EXIT
| Method Detail |
|---|
CAstNode getTarget(CAstNode from,
java.lang.Object label)
java.util.Collection getTargetLabels(CAstNode from)
from has a target.
java.util.Collection getSourceNodes(CAstNode to)
java.util.Collection<CAstNode> getMappedNodes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||