Package org.sonar.plugins.php.api.cfg
Class ControlFlowGraph
- java.lang.Object
-
- org.sonar.plugins.php.api.cfg.ControlFlowGraph
-
public class ControlFlowGraph extends Object
The Control Flow Graph for a PHP script or for the body of a function.Each node of the graph represents a list of elements which are executed sequentially. Each node has:
- one ore more successor blocks,
- zero or more predecessor blocks.
A Control Flow Graph has a single start node and a single end node. The end node has no successor and no element. WARNING: This is an experimental API, it may change without notice.
-
-
Field Summary
Fields Modifier and Type Field Description static Set<Tree.Kind>KINDS_WITH_CONTROL_FLOW
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<CfgBlock>blocks()Includes start and end blocksstatic ControlFlowGraphbuild(BlockTree body)WARNING: This is an experimental API, it may change without notice.static ControlFlowGraphbuild(Tree tree, CheckContext context)WARNING: This is an experimental API, it may change without notice.CfgBlockend()CfgBlockstart()
-
-
-
Method Detail
-
build
public static ControlFlowGraph build(BlockTree body)
WARNING: This is an experimental API, it may change without notice.
-
build
@CheckForNull public static ControlFlowGraph build(Tree tree, CheckContext context)
WARNING: This is an experimental API, it may change without notice.
-
start
public CfgBlock start()
-
end
public CfgBlock end()
-
-