Class ExtendedNode
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.builder.ExtendedNode
-
- Direct Known Subclasses:
ConditionalJump
public abstract class ExtendedNode extends java.lang.Object
An extended node can be one of several things (depending on itstype
):- NODE:
NodeHolder
. An extended node of this type is just a wrapper for aNode
(that cannot throw exceptions). - EXCEPTION_NODE:
NodeWithExceptionsHolder
. A wrapper for aNode
which can throw exceptions. It contains a label for every possible exception type the node might throw. - UNCONDITIONAL_JUMP:
UnconditionalJump
. An unconditional jump to a label. - TWO_TARGET_CONDITIONAL_JUMP:
ConditionalJump
. A conditional jump with two targets for both the 'then' and 'else' branch.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExtendedNode.ExtendedNodeType
Extended node types (description see above).
-
Field Summary
Fields Modifier and Type Field Description protected BlockImpl
block
The basic block this extended node belongs to (as determined in phase two).protected boolean
terminatesExecution
Does this node terminate the execution? (e.g., "System.exit()")protected ExtendedNode.ExtendedNodeType
type
Type of this node.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExtendedNode(ExtendedNode.ExtendedNodeType type)
Create a new ExtendedNode.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BlockImpl
getBlock()
Label
getLabel()
Returns the label associated with this extended node (only applicable if type isExtendedNode.ExtendedNodeType.CONDITIONAL_JUMP
orExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP
).Node
getNode()
Returns the node contained in this extended node (only applicable if the type isNODE
orEXCEPTION_NODE
).boolean
getTerminatesExecution()
ExtendedNode.ExtendedNodeType
getType()
void
setBlock(BlockImpl b)
void
setTerminatesExecution(boolean terminatesExecution)
java.lang.String
toString()
abstract java.lang.String
toStringDebug()
Returns a verbose string representation of this, useful for debugging.
-
-
-
Field Detail
-
block
protected BlockImpl block
The basic block this extended node belongs to (as determined in phase two).
-
type
protected final ExtendedNode.ExtendedNodeType type
Type of this node.
-
terminatesExecution
protected boolean terminatesExecution
Does this node terminate the execution? (e.g., "System.exit()")
-
-
Constructor Detail
-
ExtendedNode
protected ExtendedNode(ExtendedNode.ExtendedNodeType type)
Create a new ExtendedNode.- Parameters:
type
- the type of this node
-
-
Method Detail
-
getType
public ExtendedNode.ExtendedNodeType getType()
-
getTerminatesExecution
public boolean getTerminatesExecution()
-
setTerminatesExecution
public void setTerminatesExecution(boolean terminatesExecution)
-
getNode
public Node 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 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
public BlockImpl getBlock()
-
setBlock
public void setBlock(BlockImpl b)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringDebug
public abstract java.lang.String toStringDebug()
Returns a verbose string representation of this, useful for debugging.- Returns:
- a string representation of this
-
-