Module dev.civl.abc
Interface EnumeratorDeclarationNode
- All Superinterfaces:
ASTNode,DeclarationNode
The declaration of an enumerator (enumeration constant) within an enumeration
type definition.
-
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.Returns the entity whose existence is declared by this declaration.getValue()Each enumerator in an enumeration type definition may have an optional constant value specified.voidsetValue(ExpressionNode value) Sets the optional value expression to the given expression node.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.declaration.DeclarationNode
getIdentifier, getName, isDefinition, setEntity, setIdentifier, setIsDefinition
-
Method Details
-
getValue
ExpressionNode getValue()Each enumerator in an enumeration type definition may have an optional constant value specified. This method returns the constant expression for that value, if the value is present. Otherwise, returnsnull- Returns:
- the specified constant value for this enumerator, else null
- See Also:
-
setValue
Sets the optional value expression to the given expression node.- Parameters:
value- a constant integer expression
-
getEntity
Enumerator getEntity()Description copied from interface:DeclarationNodeReturns the entity whose existence is declared by this declaration. This is initiallynull, and can be changed byDeclarationNode.setEntity(Entity).- Specified by:
getEntityin interfaceDeclarationNode- Returns:
- the entity declared by this declaration
- See Also:
-
copy
EnumeratorDeclarationNode 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.- Specified by:
copyin interfaceASTNode- Specified by:
copyin interfaceDeclarationNode- Returns:
- deep copy of this node
-