Package org.sonar.python.cfg
Class PythonCfgBranchingBlock
- java.lang.Object
-
- org.sonar.python.cfg.PythonCfgBlock
-
- org.sonar.python.cfg.PythonCfgBranchingBlock
-
- All Implemented Interfaces:
CfgBlock,CfgBranchingBlock
public class PythonCfgBranchingBlock extends PythonCfgBlock implements CfgBranchingBlock
-
-
Constructor Summary
Constructors Constructor Description PythonCfgBranchingBlock(Tree branchingTree, CfgBlock trueSuccessor, CfgBlock falseSuccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreebranchingTree()Syntax tree causing branching: e.g.CfgBlockfalseSuccessor()voidsetTrueSuccessor(PythonCfgBlock trueSuccessor)Set<CfgBlock>successors()CfgBlocksyntacticSuccessor()protected StringtoStringDisplayPosition()CfgBlocktrueSuccessor()-
Methods inherited from class org.sonar.python.cfg.PythonCfgBlock
addElement, elements, isEmptyBlock, predecessors, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.plugins.python.api.cfg.CfgBlock
elements, predecessors
-
-
-
-
Method Detail
-
successors
public Set<CfgBlock> successors()
- Specified by:
successorsin interfaceCfgBlock
-
syntacticSuccessor
@CheckForNull public CfgBlock syntacticSuccessor()
- Specified by:
syntacticSuccessorin interfaceCfgBlock- Returns:
- block following this one if no jump is applied
Returns
nullif this block doesn't end with jump statement (break, continue, return, raise)
-
trueSuccessor
public CfgBlock trueSuccessor()
- Specified by:
trueSuccessorin interfaceCfgBranchingBlock
-
falseSuccessor
public CfgBlock falseSuccessor()
- Specified by:
falseSuccessorin interfaceCfgBranchingBlock
-
branchingTree
public Tree branchingTree()
Description copied from interface:CfgBranchingBlockSyntax tree causing branching: e.g. loop tree, if statement tree- Specified by:
branchingTreein interfaceCfgBranchingBlock
-
setTrueSuccessor
public void setTrueSuccessor(PythonCfgBlock trueSuccessor)
-
toStringDisplayPosition
protected String toStringDisplayPosition()
- Overrides:
toStringDisplayPositionin classPythonCfgBlock
-
-