Class ConditionalJump
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.builder.ExtendedNode
-
- org.checkerframework.dataflow.cfg.builder.ConditionalJump
-
public class ConditionalJump extends ExtendedNode
An extended node of typeExtendedNode.ExtendedNodeType.CONDITIONAL_JUMP
.Important: In the list of extended nodes, there should not be any labels that point to a conditional jump. Furthermore, the node directly ahead of any conditional jump has to be a
NodeWithExceptionsHolder
orNodeHolder
, and the node held by that extended node is required to be of boolean type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.checkerframework.dataflow.cfg.builder.ExtendedNode
ExtendedNode.ExtendedNodeType
-
-
Field Summary
Fields Modifier and Type Field Description protected Store.FlowRule
falseFlowRule
The false branch flow rule.protected Label
falseSucc
The false successor label.protected Store.FlowRule
trueFlowRule
The true branch flow rule.protected Label
trueSucc
The true successor label.-
Fields inherited from class org.checkerframework.dataflow.cfg.builder.ExtendedNode
block, terminatesExecution, type
-
-
Constructor Summary
Constructors Constructor Description ConditionalJump(Label trueSucc, Label falseSucc)
Construct a ConditionalJump.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Label
getElseLabel()
Store.FlowRule
getFalseFlowRule()
Returns the false branch flow rule.Label
getThenLabel()
Store.FlowRule
getTrueFlowRule()
Returns the true branch flow rule.void
setFalseFlowRule(Store.FlowRule rule)
Sets the false branch flow rule.void
setTrueFlowRule(Store.FlowRule rule)
Sets the true branch flow rule.java.lang.String
toString()
Produce a string representation.java.lang.String
toStringDebug()
Returns a verbose string representation of this, useful for debugging.-
Methods inherited from class org.checkerframework.dataflow.cfg.builder.ExtendedNode
getBlock, getLabel, getNode, getTerminatesExecution, getType, setBlock, setTerminatesExecution
-
-
-
-
Field Detail
-
trueSucc
protected final Label trueSucc
The true successor label.
-
falseSucc
protected final Label falseSucc
The false successor label.
-
trueFlowRule
protected Store.FlowRule trueFlowRule
The true branch flow rule.
-
falseFlowRule
protected Store.FlowRule falseFlowRule
The false branch flow rule.
-
-
Method Detail
-
getThenLabel
public Label getThenLabel()
-
getElseLabel
public Label getElseLabel()
-
getTrueFlowRule
public Store.FlowRule getTrueFlowRule()
Returns the true branch flow rule.- Returns:
- the true branch flow rule
-
getFalseFlowRule
public Store.FlowRule getFalseFlowRule()
Returns the false branch flow rule.- Returns:
- the false branch flow rule
-
setTrueFlowRule
public void setTrueFlowRule(Store.FlowRule rule)
Sets the true branch flow rule.- Parameters:
rule
- the new true branch flow rule
-
setFalseFlowRule
public void setFalseFlowRule(Store.FlowRule rule)
Sets the false branch flow rule.- Parameters:
rule
- the new false branch flow rule
-
toString
public java.lang.String toString()
Produce a string representation.- Overrides:
toString
in classExtendedNode
- Returns:
- a string representation
- See Also:
PhaseOneResult.nodeToString(org.checkerframework.dataflow.cfg.builder.ExtendedNode)
-
toStringDebug
public java.lang.String toStringDebug()
Description copied from class:ExtendedNode
Returns a verbose string representation of this, useful for debugging.- Specified by:
toStringDebug
in classExtendedNode
- Returns:
- a string representation of this
-
-