Top Description Fields Constructors Methods
org.jruby.ast

public Class LiteralNode

extends Node
implements InvisibleNode
Class Inheritance
All Implemented Interfaces
org.jruby.ast.InvisibleNode
Imports
java.util.List, org.jruby.RubySymbol, org.jruby.ast.visitor.NodeVisitor, org.jruby.util.ByteList

This is not a node in the classic sense in that it has no defined or interpret method which can be called. It just stores the position of the literal and the name/value of the literal. We made it a node so that the parser needs to work less hard in its productions. dynamic literals are nodes and by having literals also be nodes means they have a common subtype which is not Object. Used by alias and undef.

Field Summary

Modifier and TypeField and Description
private final RubySymbol
Inherited from org.jruby.ast.Node:
containsVariableAssignmentEMPTY_LISTnewline

Constructor Summary

AccessConstructor and Description
public
LiteralNode(int line, RubySymbol name)

Method Summary

Modifier and TypeMethod and Description
public <T> T
accept(NodeVisitor<T>
the visitor
iVisitor
)

Implements abstract org.jruby.ast.Node.accept.

Accept for the visitor pattern.

public List<Node>
public ByteList
public String
public NodeType
public RubySymbol
Inherited from org.jruby.ast.Node:
containsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNameisNewlineisNilneedsDefinitionChecksetLinesetNewlinetoStringtoStringtoStringExtraInfotoStringInternalunsetNewline

Field Detail

nameback to summary
private final RubySymbol name

Constructor Detail

LiteralNodeback to summary
public LiteralNode(int line, RubySymbol name)

Method Detail

acceptback to summary
public <T> T accept(NodeVisitor<T> iVisitor)

Implements abstract org.jruby.ast.Node.accept.

Accept for the visitor pattern.

Parameters
iVisitor:NodeVisitor<T>

the visitor

childNodesback to summary
public List<Node> childNodes()

Implements abstract org.jruby.ast.Node.childNodes.

getByteNameback to summary
public ByteList getByteName()
getNameback to summary
public String getName()
getNodeTypeback to summary
public NodeType getNodeType()

Implements abstract org.jruby.ast.Node.getNodeType.

Returns:NodeType

Doc from org.jruby.ast.Node.getNodeType.

the nodeId

Annotations
@Override
getSymbolNameback to summary
public RubySymbol getSymbolName()