Top Description Fields Constructors Methods
org.jruby.ast

public Class DVarNode

extends Node
implements INameNode, IScopedNode, SideEffectFree
Class Inheritance
All Implemented Interfaces
org.jruby.ast.SideEffectFree, org.jruby.ast.IScopedNode, org.jruby.ast.types.INameNode
Imports
java.util.List, org.jruby.RubySymbol, org.jruby.ast.types.INameNode, org.jruby.ast.visitor.NodeVisitor

Access a dynamic variable (e.g. block scope local variable).

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
DVarNode(int line, int location, 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 int

Returns:

0 for current scope, 1 for one down, ...
getDepth
()

Implements org.jruby.ast.IScopedNode.getDepth.

How many scopes should we burrow down to until we need to set the block variable value.

public int

Returns:

Returns an int offset into storage structure
getIndex
()

Implements org.jruby.ast.IScopedNode.getIndex.

Gets the index within the scope construct that actually holds the eval'd value of this local variable

public RubySymbol

Returns:

Returns a String
getName
()

Implements org.jruby.ast.types.INameNode.getName.

Gets the name.

public NodeType
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:
containsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNameisNewlineisNilsetLinesetNewlinetoStringtoStringtoStringExtraInfotoStringInternalunsetNewline

Field Detail

locationback to summary
private final int location
nameback to summary
private final RubySymbol name

Constructor Detail

DVarNodeback to summary
public DVarNode(int line, int location, 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.

getDepthback to summary
public int getDepth()

Implements org.jruby.ast.IScopedNode.getDepth.

How many scopes should we burrow down to until we need to set the block variable value.

Returns:int

0 for current scope, 1 for one down, ...

getIndexback to summary
public int getIndex()

Implements org.jruby.ast.IScopedNode.getIndex.

Gets the index within the scope construct that actually holds the eval'd value of this local variable

Returns:int

Returns an int offset into storage structure

getNameback to summary
public RubySymbol getName()

Implements org.jruby.ast.types.INameNode.getName.

Gets the name.

Returns:RubySymbol

Returns a String

getNodeTypeback to summary
public NodeType getNodeType()

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

Returns:NodeType

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

the nodeId

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