Class ConditionalJump
java.lang.Object
org.checkerframework.dataflow.cfg.builder.ConditionalJump
An extended node of type
ExtendedNode.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 or NodeHolder, and the node held by that extended node
is required to be of boolean type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BlockImplThe basic block this extended node belongs to (as determined in phase two).protected Store.FlowRuleThe false branch flow rule.protected final org.checkerframework.dataflow.cfg.builder.LabelThe false successor label.protected booleanDoes this node terminate the execution? (e.g., "System.exit()")protected Store.FlowRuleThe true branch flow rule.protected final org.checkerframework.dataflow.cfg.builder.LabelThe true successor label.protected final org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeTypeType of this node. -
Constructor Summary
ConstructorsConstructorDescriptionConditionalJump(org.checkerframework.dataflow.cfg.builder.Label trueSucc, org.checkerframework.dataflow.cfg.builder.Label falseSucc) Construct a ConditionalJump. -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()org.checkerframework.dataflow.cfg.builder.LabelReturns the false branch flow rule.org.checkerframework.dataflow.cfg.builder.LabelgetLabel()Returns the label associated with this extended node (only applicable if type isExtendedNode.ExtendedNodeType.CONDITIONAL_JUMPorExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP).getNode()Returns the node contained in this extended node (only applicable if the type isNODEorEXCEPTION_NODE).booleanorg.checkerframework.dataflow.cfg.builder.LabelReturns the true branch flow rule.org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeTypegetType()voidvoidSets the false branch flow rule.voidsetTerminatesExecution(boolean terminatesExecution) voidSets the true branch flow rule.toString()Produce a string representation.Returns a verbose string representation of this, useful for debugging.
-
Field Details
-
trueSucc
protected final org.checkerframework.dataflow.cfg.builder.Label trueSuccThe true successor label. -
falseSucc
protected final org.checkerframework.dataflow.cfg.builder.Label falseSuccThe false successor label. -
trueFlowRule
The true branch flow rule. -
falseFlowRule
The false branch flow rule. -
block
The basic block this extended node belongs to (as determined in phase two). -
type
protected final org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeType typeType of this node. -
terminatesExecution
protected boolean terminatesExecutionDoes this node terminate the execution? (e.g., "System.exit()")
-
-
Constructor Details
-
ConditionalJump
public ConditionalJump(org.checkerframework.dataflow.cfg.builder.Label trueSucc, org.checkerframework.dataflow.cfg.builder.Label falseSucc) Construct a ConditionalJump.- Parameters:
trueSucc- true successor labelfalseSucc- false successor label
-
-
Method Details
-
getThenLabel
public org.checkerframework.dataflow.cfg.builder.Label getThenLabel() -
getElseLabel
public org.checkerframework.dataflow.cfg.builder.Label getElseLabel() -
getTrueFlowRule
Returns the true branch flow rule.- Returns:
- the true branch flow rule
-
getFalseFlowRule
Returns the false branch flow rule.- Returns:
- the false branch flow rule
-
setTrueFlowRule
Sets the true branch flow rule.- Parameters:
rule- the new true branch flow rule
-
setFalseFlowRule
Sets the false branch flow rule.- Parameters:
rule- the new false branch flow rule
-
toString
Produce a string representation.- Returns:
- a string representation
- See Also:
-
toStringDebug
Returns a verbose string representation of this, useful for debugging.- Returns:
- a string representation of this
-
getType
public org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeType getType() -
getTerminatesExecution
public boolean getTerminatesExecution() -
setTerminatesExecution
public void setTerminatesExecution(boolean terminatesExecution) -
getNode
Returns the node contained in this extended node (only applicable if the type isNODEorEXCEPTION_NODE).- Returns:
- the node contained in this extended node (only applicable if the type is
NODEorEXCEPTION_NODE)
-
getLabel
public org.checkerframework.dataflow.cfg.builder.Label getLabel()Returns the label associated with this extended node (only applicable if type isExtendedNode.ExtendedNodeType.CONDITIONAL_JUMPorExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP).- Returns:
- the label associated with this extended node (only applicable if type is
ExtendedNode.ExtendedNodeType.CONDITIONAL_JUMPorExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP)
-
getBlock
-
setBlock
-