Package org.sonar.javascript.cfg
Class ControlFlowGraph
- java.lang.Object
-
- org.sonar.javascript.cfg.ControlFlowGraph
-
public class ControlFlowGraph extends Object
The Control Flow Graph for a JavaScript script or for the body of a function.Each node of the graph represents a list of elements which are executed one after the other. Each node has:
- one ore more successor blocks,
- zero or more predecessor blocks.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<CfgBlock>blocks()static ControlFlowGraphbuild(ScriptTree tree)static ControlFlowGraphbuild(BlockTree body)Set<SyntaxToken>disconnectingJumps(CfgBlock block)CfgBlockend()CfgBlockstart()Set<CfgBlock>unreachableBlocks()
-
-
-
Method Detail
-
build
public static ControlFlowGraph build(ScriptTree tree)
-
build
public static ControlFlowGraph build(BlockTree body)
-
start
public CfgBlock start()
-
end
public CfgBlock end()
-
disconnectingJumps
public Set<SyntaxToken> disconnectingJumps(CfgBlock block)
-
-