Represents a label in a
switch statement of the form
case constant-expression: or default:.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKind -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a deep copy of this AST node.If this is acaselabel, returns the constant expression following thecasekeyword; else returnsnullbooleanIs this adefaultlabel?Methods inherited from interface dev.civl.abc.ast.node.IF.ASTNode
addAllTransformAnnotations, addTransformAnnotation, child, childIndex, children, diff, equiv, getAttribute, getOwner, getScope, getSource, id, keepOnly, nextDFS, nodeKind, numChildren, parent, prettyPrint, prettyRepresentation, prettyRepresentation, print, remove, removeChild, removeTransformAnnotation, setAttribute, setChild, setId, setOwner, setScope, toString, transformAnnotationsMethods inherited from interface dev.civl.abc.ast.node.IF.label.LabelNode
getStatement, setStatement
-
Method Details
-
isDefault
boolean isDefault()Is this adefaultlabel?- Returns:
trueif this is adefaultlabel;falseif this is acaselabel
-
getExpression
ExpressionNode getExpression()If this is acaselabel, returns the constant expression following thecasekeyword; else returnsnull- Returns:
- the constant expression following
caseornull
-
copy
SwitchLabelNode copy()Description copied from interface:ASTNodeReturns a deep copy of this AST node. The node and all of its descendants will be cloned. The cloning does not copy analysis or attribute information.
-