public class ControlFlowGraph
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> |
convertedTreeLookup
Map from AST
Tree s to post-conversion Node s. |
protected SpecialBlock |
entryBlock
The entry block of the control flow graph.
|
protected SpecialBlock |
exceptionalExitBlock
The exceptional exit block of the control flow graph.
|
protected SpecialBlock |
regularExitBlock
The regular exit block of the control flow graph.
|
protected java.util.List<ReturnNode> |
returnNodes
All return nodes (if any) encountered.
|
protected java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> |
treeLookup
Maps from AST
Tree s to Node s. |
protected UnderlyingAST |
underlyingAST
The AST this CFG corresponds to.
|
Constructor and Description |
---|
ControlFlowGraph(SpecialBlock entryBlock,
SpecialBlockImpl regularExitBlock,
SpecialBlockImpl exceptionalExitBlock,
UnderlyingAST underlyingAST,
java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> treeLookup,
java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> convertedTreeLookup,
java.util.List<ReturnNode> returnNodes) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Block> |
getAllBlocks() |
@Nullable com.sun.source.tree.ClassTree |
getContainingClass(com.sun.source.tree.Tree t)
|
@Nullable com.sun.source.tree.MethodTree |
getContainingMethod(com.sun.source.tree.Tree t)
|
java.util.List<Block> |
getDepthFirstOrderedBlocks() |
SpecialBlock |
getEntryBlock() |
SpecialBlock |
getExceptionalExitBlock() |
Node |
getNodeCorrespondingToTree(com.sun.source.tree.Tree t) |
SpecialBlock |
getRegularExitBlock() |
java.util.List<ReturnNode> |
getReturnNodes() |
java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> |
getTreeLookup() |
UnderlyingAST |
getUnderlyingAST() |
protected final SpecialBlock entryBlock
protected final SpecialBlock regularExitBlock
protected final SpecialBlock exceptionalExitBlock
protected UnderlyingAST underlyingAST
protected java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> treeLookup
Tree
s to Node
s. Every Tree that produces
a value will have at least one corresponding Node. Trees
that undergo conversions, such as boxing or unboxing, can map to two
distinct Nodes. The Node for the pre-conversion value is stored
in treeLookup, while the Node for the post-conversion value
is stored in convertedTreeLookup.protected java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> convertedTreeLookup
Tree
s to post-conversion Node
s.protected final java.util.List<ReturnNode> returnNodes
public ControlFlowGraph(SpecialBlock entryBlock, SpecialBlockImpl regularExitBlock, SpecialBlockImpl exceptionalExitBlock, UnderlyingAST underlyingAST, java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> treeLookup, java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> convertedTreeLookup, java.util.List<ReturnNode> returnNodes)
public Node getNodeCorrespondingToTree(com.sun.source.tree.Tree t)
Node
to which the Tree
t
corresponds.public SpecialBlock getEntryBlock()
public java.util.List<ReturnNode> getReturnNodes()
public SpecialBlock getRegularExitBlock()
public SpecialBlock getExceptionalExitBlock()
public UnderlyingAST getUnderlyingAST()
public java.util.Set<Block> getAllBlocks()
public java.util.List<Block> getDepthFirstOrderedBlocks()
public java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> getTreeLookup()
public @Nullable com.sun.source.tree.MethodTree getContainingMethod(com.sun.source.tree.Tree t)
public @Nullable com.sun.source.tree.ClassTree getContainingClass(com.sun.source.tree.Tree t)