Top Description Fields Constructors Methods
org.jruby.ast

public Class ArgumentNode

extends Node
implements INameNode
Class Inheritance
All Implemented Interfaces
org.jruby.ast.types.INameNode
Known Direct Subclasses
org.jruby.ast.KeywordRestArgNode, org.jruby.ast.RestArgNode
Imports
java.util.List, org.jruby.RubySymbol, org.jruby.ast.types.INameNode, org.jruby.ast.visitor.NodeVisitor

Simple Node for named entities. Things like the name of a method will make a node for the name. Also local variables will make a ArgumentNode. In the case of a local variable we will also keep a list of it's location.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
ArgumentNode(int line, RubySymbol identifier, int location)

Method Summary

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

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

public List<Node>
public int

Returns:

0 for current scope, 1 for one down, ...
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
()

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

public RubySymbol
public NodeType
Inherited from org.jruby.ast.Node:
containsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNameisNewlineisNilneedsDefinitionChecksetLinesetNewlinetoStringtoStringtoStringExtraInfotoStringInternalunsetNewline

Field Detail

identifierback to summary
private final RubySymbol identifier
locationback to summary
private final int location

Constructor Detail

ArgumentNodeback to summary
public ArgumentNode(int line, RubySymbol identifier, int location)

Method Detail

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

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

Annotations
@Override
childNodesback to summary
public List<Node> childNodes()

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

getDepthback to summary
public int 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()

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.

getNodeTypeback to summary
public NodeType getNodeType()

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

Returns:NodeType

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

the nodeId