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
Modifier and TypeFieldDescriptionprotected BlockImpl
The basic block this extended node belongs to (as determined in phase two).protected Store.FlowRule
The false branch flow rule.protected final org.checkerframework.dataflow.cfg.builder.Label
The false successor label.protected boolean
Does this node terminate the execution? (e.g., "System.exit()")protected Store.FlowRule
The true branch flow rule.protected final org.checkerframework.dataflow.cfg.builder.Label
The true successor label.protected final org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeType
Type of this node. -
Constructor Summary
ConstructorDescriptionConditionalJump
(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.Label
Returns the false branch flow rule.org.checkerframework.dataflow.cfg.builder.Label
getLabel()
Returns the label associated with this extended node (only applicable if type isExtendedNode.ExtendedNodeType.CONDITIONAL_JUMP
orExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP
).getNode()
Returns the node contained in this extended node (only applicable if the type isNODE
orEXCEPTION_NODE
).boolean
org.checkerframework.dataflow.cfg.builder.Label
Returns the true branch flow rule.org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeType
getType()
void
void
Sets the false branch flow rule.void
setTerminatesExecution
(boolean terminatesExecution) void
Sets 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 isNODE
orEXCEPTION_NODE
).- Returns:
- the node contained in this extended node (only applicable if the type is
NODE
orEXCEPTION_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_JUMP
orExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP
).- Returns:
- the label associated with this extended node (only applicable if type is
ExtendedNode.ExtendedNodeType.CONDITIONAL_JUMP
orExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP
)
-
getBlock
-
setBlock
-