public class ControlFlowGraph
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.IdentityHashMap<Tree,java.util.Set<Node>> |
convertedTreeLookup
|
protected java.util.List<ClassTree> |
declaredClasses
Class declarations that have been encountered when building the control-flow graph for a
method.
|
protected java.util.List<LambdaExpressionTree> |
declaredLambdas
Lambdas encountered when building the control-flow graph for a method, variable initializer,
or initializer.
|
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<Tree,java.util.Set<Node>> |
treeLookup
|
protected java.util.IdentityHashMap<UnaryTree,AssignmentNode> |
unaryAssignNodeLookup
Map from AST
UnaryTree s to corresponding AssignmentNode 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<Tree,java.util.Set<Node>> treeLookup,
java.util.IdentityHashMap<Tree,java.util.Set<Node>> convertedTreeLookup,
java.util.IdentityHashMap<UnaryTree,AssignmentNode> unaryAssignNodeLookup,
java.util.List<ReturnNode> returnNodes,
java.util.List<ClassTree> declaredClasses,
java.util.List<LambdaExpressionTree> declaredLambdas) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Block> |
getAllBlocks() |
@Nullable ClassTree |
getContainingClass(Tree t)
|
@Nullable MethodTree |
getContainingMethod(Tree t)
|
java.util.List<ClassTree> |
getDeclaredClasses() |
java.util.List<LambdaExpressionTree> |
getDeclaredLambdas() |
java.util.List<Block> |
getDepthFirstOrderedBlocks() |
SpecialBlock |
getEntryBlock() |
SpecialBlock |
getExceptionalExitBlock() |
java.util.Set<Node> |
getNodesCorrespondingToTree(Tree t) |
SpecialBlock |
getRegularExitBlock() |
java.util.List<ReturnNode> |
getReturnNodes() |
java.util.IdentityHashMap<Tree,java.util.Set<Node>> |
getTreeLookup() |
java.util.IdentityHashMap<UnaryTree,AssignmentNode> |
getUnaryAssignNodeLookup() |
UnderlyingAST |
getUnderlyingAST() |
protected final SpecialBlock entryBlock
protected final SpecialBlock regularExitBlock
protected final SpecialBlock exceptionalExitBlock
protected final UnderlyingAST underlyingAST
protected final java.util.IdentityHashMap<Tree,java.util.Set<Node>> treeLookup
Tree
s to sets of 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 final java.util.IdentityHashMap<Tree,java.util.Set<Node>> convertedTreeLookup
protected final java.util.IdentityHashMap<UnaryTree,AssignmentNode> unaryAssignNodeLookup
UnaryTree
s to corresponding AssignmentNode
s.protected final java.util.List<ReturnNode> returnNodes
protected final java.util.List<ClassTree> declaredClasses
protected final java.util.List<LambdaExpressionTree> declaredLambdas
public ControlFlowGraph(SpecialBlock entryBlock, SpecialBlockImpl regularExitBlock, SpecialBlockImpl exceptionalExitBlock, UnderlyingAST underlyingAST, java.util.IdentityHashMap<Tree,java.util.Set<Node>> treeLookup, java.util.IdentityHashMap<Tree,java.util.Set<Node>> convertedTreeLookup, java.util.IdentityHashMap<UnaryTree,AssignmentNode> unaryAssignNodeLookup, java.util.List<ReturnNode> returnNodes, java.util.List<ClassTree> declaredClasses, java.util.List<LambdaExpressionTree> declaredLambdas)
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<Tree,java.util.Set<Node>> getTreeLookup()
public java.util.IdentityHashMap<UnaryTree,AssignmentNode> getUnaryAssignNodeLookup()
public @Nullable MethodTree getContainingMethod(Tree t)
public java.util.List<ClassTree> getDeclaredClasses()
public java.util.List<LambdaExpressionTree> getDeclaredLambdas()