Class CFG.Block
java.lang.Object
org.sonar.java.cfg.CFG.Block
- All Implemented Interfaces:
CFG.IBlock<Tree>,ControlFlowGraph.Block
- Enclosing class:
CFG
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExitSuccessor(CFG.Block block) voidaddFalseSuccessor(CFG.Block successor) voidaddTrueSuccessor(CFG.Block successor) Label is used to contain additional information about a block which is not directly related to CFG structure.elements()intid()booleanbooleanbooleanbooleanbooleanvoidsetCaseGroup(CaseGroupTree caseGroup) This method makes the implementation of RSPEC-3626 almost trivial.
-
Field Details
-
IS_CATCH_BLOCK
-
-
Constructor Details
-
Block
public Block(int id)
-
-
Method Details
-
id
public int id()- Specified by:
idin interfaceCFG.IBlock<Tree>- Specified by:
idin interfaceControlFlowGraph.Block
-
elements
- Specified by:
elementsin interfaceCFG.IBlock<Tree>- Specified by:
elementsin interfaceControlFlowGraph.Block
-
trueBlock
- Specified by:
trueBlockin interfaceControlFlowGraph.Block
-
falseBlock
- Specified by:
falseBlockin interfaceControlFlowGraph.Block
-
exitBlock
- Specified by:
exitBlockin interfaceControlFlowGraph.Block
-
isFinallyBlock
public boolean isFinallyBlock()- Specified by:
isFinallyBlockin interfaceControlFlowGraph.Block
-
isCatchBlock
public boolean isCatchBlock()- Specified by:
isCatchBlockin interfaceControlFlowGraph.Block
-
isDefaultBlock
public boolean isDefaultBlock()- Specified by:
isDefaultBlockin interfaceControlFlowGraph.Block
-
addTrueSuccessor
-
addFalseSuccessor
-
addExitSuccessor
-
predecessors
- Specified by:
predecessorsin interfaceControlFlowGraph.Block
-
successors
- Specified by:
successorsin interfaceCFG.IBlock<Tree>- Specified by:
successorsin interfaceControlFlowGraph.Block
-
exceptions
- Specified by:
exceptionsin interfaceControlFlowGraph.Block
-
terminator
- Specified by:
terminatorin interfaceCFG.IBlock<Tree>- Specified by:
terminatorin interfaceControlFlowGraph.Block
-
isInactive
public boolean isInactive() -
isMethodExitBlock
public boolean isMethodExitBlock() -
successorWithoutJump
This method makes the implementation of RSPEC-3626 almost trivial.- Returns:
- the block which would be the successor of this one if this one didn't terminate with a jump
-
caseGroup
Label is used to contain additional information about a block which is not directly related to CFG structure. Used for simplifying implementation of RSPEC-128.- Specified by:
caseGroupin interfaceControlFlowGraph.Block
-
setCaseGroup
-