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
Trees to post-conversion Nodes. |
protected SpecialBlock |
entryBlock
The entry block of the control flow graph.
|
protected SpecialBlock |
exceptionalExitBlock
The exceptional exit block of the control flow graph.
|
protected java.util.IdentityHashMap<com.sun.source.tree.Tree,java.util.List<com.sun.source.tree.Tree>> |
generatedTreesLookupMap
Map from AST
Trees to generated Trees. |
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
Trees to Nodes. |
protected java.util.IdentityHashMap<com.sun.source.tree.UnaryTree,AssignmentNode> |
unaryAssignNodeLookup
Map from AST
UnaryTrees to corresponding AssignmentNodes. |
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.IdentityHashMap<com.sun.source.tree.UnaryTree,AssignmentNode> unaryAssignNodeLookup,
java.util.List<ReturnNode> returnNodes,
java.util.IdentityHashMap<com.sun.source.tree.Tree,java.util.List<com.sun.source.tree.Tree>> generatedTreesLookupMap) |
| 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() |
java.util.IdentityHashMap<com.sun.source.tree.Tree,java.util.List<com.sun.source.tree.Tree>> |
getGeneratedTreesLookup() |
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() |
java.util.IdentityHashMap<com.sun.source.tree.UnaryTree,AssignmentNode> |
getUnaryAssignNodeLookup() |
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
Trees to Nodes. 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
Trees to post-conversion Nodes.protected java.util.IdentityHashMap<com.sun.source.tree.UnaryTree,AssignmentNode> unaryAssignNodeLookup
UnaryTrees to corresponding AssignmentNodes.protected final java.util.List<ReturnNode> returnNodes
protected final java.util.IdentityHashMap<com.sun.source.tree.Tree,java.util.List<com.sun.source.tree.Tree>> generatedTreesLookupMap
Trees to generated Trees.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.IdentityHashMap<com.sun.source.tree.UnaryTree,AssignmentNode> unaryAssignNodeLookup, java.util.List<ReturnNode> returnNodes, java.util.IdentityHashMap<com.sun.source.tree.Tree,java.util.List<com.sun.source.tree.Tree>> generatedTreesLookupMap)
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()
Blocks may appear more than once in the sequence.
public java.util.IdentityHashMap<com.sun.source.tree.Tree,Node> getTreeLookup()
public java.util.IdentityHashMap<com.sun.source.tree.UnaryTree,AssignmentNode> getUnaryAssignNodeLookup()
public java.util.IdentityHashMap<com.sun.source.tree.Tree,java.util.List<com.sun.source.tree.Tree>> getGeneratedTreesLookup()
Trees from Treepublic @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)