public class ConstDeclNode extends AssignableNode implements INameNode
Constructor and Description |
---|
ConstDeclNode(ISourcePosition position,
String name,
INameNode constNode,
Node valueNode) |
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(NodeVisitor<T> iVisitor)
Accept for the visitor pattern.
|
List<Node> |
childNodes() |
Node |
getConstNode()
Get the full path, including the name of the new constant (in Foo::BAR it is Foo::BAR) or null.
|
String |
getName()
Gets the name (this is the rightmost element of lhs (in Foo::BAR it is BAR).
|
NodeType |
getNodeType() |
boolean |
needsDefinitionCheck()
Check whether the given node is considered always "defined" or whether it
has some form of definition check.
|
getArity, getValueNode, setValueNode
createList, createList, createList, createList, findFirstChild, getNodeName, getPosition, isNil, setPosition, toString, toString
public ConstDeclNode(ISourcePosition position, String name, INameNode constNode, Node valueNode)
public NodeType getNodeType()
getNodeType
in class Node
public <T> T accept(NodeVisitor<T> iVisitor)
public String getName()
public Node getConstNode()
((Colon2Node) node.getConstNode()).getLeftNode()
if node.getConstNode()
is a Colon2ConstNode
.public List<Node> childNodes()
childNodes
in class Node
public boolean needsDefinitionCheck()
Node
needsDefinitionCheck
in class Node
Copyright © 2001-2015 JRuby. All Rights Reserved.