Top Description Fields Constructors Methods
org.jruby.ast

public Class NilNode

extends Node
implements SideEffectFree
Class Inheritance
All Implemented Interfaces
org.jruby.ast.SideEffectFree
Known Direct Subclasses
org.jruby.ast.NilImplicitNode
Imports
java.util.List, org.jruby.ast.visitor.NodeVisitor

represents 'nil'

Field Summary

Inherited from org.jruby.ast.Node:
containsVariableAssignmentEMPTY_LISTnewline

Constructor Summary

AccessConstructor and Description
public
NilNode(int line)

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 NodeType
public boolean
isNil()

Overrides org.jruby.ast.Node.isNil.

Whether the node evaluates to nil and has no side effects.

public boolean
needsDefinitionCheck()

Overrides org.jruby.ast.Node.needsDefinitionCheck.

Check whether the given node is considered always "defined" or whether it has some form of definition check.

Inherited from org.jruby.ast.Node:
containsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNameisNewlinesetLinesetNewlinetoStringtoStringtoStringExtraInfotoStringInternalunsetNewline

Constructor Detail

NilNodeback to summary
public NilNode(int line)

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.

getNodeTypeback to summary
public NodeType getNodeType()

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

Returns:NodeType

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

the nodeId

isNilback to summary
public boolean isNil()

Overrides org.jruby.ast.Node.isNil.

Doc from org.jruby.ast.Node.isNil.

Whether the node evaluates to nil and has no side effects.

Returns:boolean

true if nil, false otherwise

needsDefinitionCheckback to summary
public boolean needsDefinitionCheck()

Overrides org.jruby.ast.Node.needsDefinitionCheck.

Doc from org.jruby.ast.Node.needsDefinitionCheck.

Check whether the given node is considered always "defined" or whether it has some form of definition check.

Returns:boolean

Whether the type of node represents a possibly undefined construct

Annotations
@Override