Package sootup.core.graph
Class ImmutableBlockStmtGraph
java.lang.Object
sootup.core.graph.StmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
sootup.core.graph.ImmutableBlockStmtGraph
-
Nested Class Summary
Nested classes/interfaces inherited from class sootup.core.graph.StmtGraph
StmtGraph.BlockGraphIterator, StmtGraph.BlockGraphIteratorAndTrapAggregator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreturns a (reconstructed) list of traps like the traptable in the bytecodeboolean
containsNode
(Stmt node) exceptionalPredecessors
(Stmt node) it is possible to reach traphandlers through inline code i.e.exceptionalSuccessors
(Stmt node) getBlockOf
(Stmt stmt) List<? extends BasicBlock<?>>
getNodes()
returns the nodes in this graph in a non-deterministic order (->Set) to get the nodes in linearized, ordered manner use iterator() or getStmts.BasicBlock<?>
boolean
hasEdgeConnecting
(Stmt source, Stmt target) returns true if there is a flow between source and target throws an Exception if at least one of the parameters is not contained in the graph.int
returns the amount of ingoing flows into nodeiterator()
int
returns the amount of flows that start from nodepredecessors
(Stmt node) returns the ingoing flows to node as an List with no reliable/specific order and possibly duplicate entries i.e.void
removeExceptionalFlowFromAllBlocks
(ClassType classType, Stmt exceptionHandlerStmt) Removes the specified exceptional flow from all blocks.successors
(Stmt node) returns the outgoing flows of node as ordered List.Methods inherited from class sootup.core.graph.StmtGraph
degree, equals, getAllSuccessors, getBlockIterator, getBranchTargetsOf, getEntrypoints, getExtendedBasicBlockPathBetween, getLabeledStmts, getStmts, getTails, isStmtBranchTarget, toString, validateStmtConnectionsInGraph
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ImmutableBlockStmtGraph
-
-
Method Details
-
getStartingStmt
- Specified by:
getStartingStmt
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
getStartingStmtBlock
- Specified by:
getStartingStmtBlock
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
getBlockOf
- Specified by:
getBlockOf
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
getNodes
Description copied from class:StmtGraph
returns the nodes in this graph in a non-deterministic order (->Set) to get the nodes in linearized, ordered manner use iterator() or getStmts.- Specified by:
getNodes
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
getBlocks
- Specified by:
getBlocks
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
getBlocksSorted
- Specified by:
getBlocksSorted
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
containsNode
- Specified by:
containsNode
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
predecessors
Description copied from class:StmtGraph
returns the ingoing flows to node as an List with no reliable/specific order and possibly duplicate entries i.e. if a JSwitchStmt has multiple cases that brnach to `node`- Specified by:
predecessors
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
exceptionalPredecessors
Description copied from class:StmtGraph
it is possible to reach traphandlers through inline code i.e. without any exceptional flow- Specified by:
exceptionalPredecessors
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
successors
Description copied from class:StmtGraph
returns the outgoing flows of node as ordered List. The List can have duplicate entries!- Specified by:
successors
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
exceptionalSuccessors
- Specified by:
exceptionalSuccessors
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
inDegree
Description copied from class:StmtGraph
returns the amount of ingoing flows into node- Specified by:
inDegree
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
outDegree
Description copied from class:StmtGraph
returns the amount of flows that start from node- Specified by:
outDegree
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
hasEdgeConnecting
Description copied from class:StmtGraph
returns true if there is a flow between source and target throws an Exception if at least one of the parameters is not contained in the graph.- Specified by:
hasEdgeConnecting
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
buildTraps
Description copied from class:StmtGraph
returns a (reconstructed) list of traps like the traptable in the bytecodeNote: if you need exceptionional flow information in more augmented with the affected blocks/stmts and not just a (reconstructed, possibly more verbose) traptable - have a look at BasicBlock.getExceptionalSuccessor()
- Specified by:
buildTraps
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
-
removeExceptionalFlowFromAllBlocks
Description copied from class:StmtGraph
Removes the specified exceptional flow from all blocks.- Specified by:
removeExceptionalFlowFromAllBlocks
in classStmtGraph<ImmutableBlockStmtGraph.ImmutableBasicBlock>
- Parameters:
classType
- The class type of the exceptional flow.exceptionHandlerStmt
- The handler statement of the exceptional flow.
-
iterator
-