Top Description Fields Constructors Methods
org.jruby.ast

public Class IterNode

extends Node
implements DefNode
Class Inheritance
All Implemented Interfaces
org.jruby.ast.DefNode
Known Direct Subclasses
org.jruby.ast.LambdaNode, org.jruby.ast.PostExeNode, org.jruby.ast.PreExeNode, org.jruby.ast.ForNode
Imports
java.util.List, org.jruby.ast.visitor.NodeVisitor, org.jruby.parser.StaticScope

Represents a block.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
IterNode(int line, Node args, StaticScope scope, Node body, int endLine)

Used by ForNode only.

public
IterNode(int line, ArgsNode args, Node body, StaticScope scope, int endLine)

Used for all non-for types of blocks.

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 ArgsNode
getArgsNode()

Implements org.jruby.ast.DefNode.getArgsNode.

Gets the argsNode.

public Node

Returns:

Returns a Node
getBodyNode
()

Implements org.jruby.ast.DefNode.getBodyNode.

Gets the bodyNode.

public int
getEndLine()

Implements org.jruby.ast.DefNode.getEndLine.

Which line if the end keyword located

public NodeType
public StaticScope
getScope()

Implements org.jruby.ast.DefNode.getScope.

Get the static scoping information.

public Node

Returns:

Returns a Node
getVarNode
()

Gets the varNode.

Inherited from org.jruby.ast.Node:
containsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNameisNewlineisNilneedsDefinitionChecksetLinesetNewlinetoStringtoStringtoStringExtraInfotoStringInternalunsetNewline

Field Detail

bodyNodeback to summary
private final Node bodyNode
endLineback to summary
private final int endLine
scopeback to summary
private final StaticScope scope
varNodeback to summary
private final Node varNode

Constructor Detail

IterNodeback to summary
public IterNode(int line, Node args, StaticScope scope, Node body, int endLine)

Used by ForNode only. This is to support 1.8-style assignments which only 'for' expressions use.

IterNodeback to summary
public IterNode(int line, ArgsNode args, Node body, StaticScope scope, int endLine)

Used for all non-for types of blocks.

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.

getArgsNodeback to summary
public ArgsNode getArgsNode()

Implements org.jruby.ast.DefNode.getArgsNode.

Doc from org.jruby.ast.DefNode.getArgsNode.

Gets the argsNode.

Returns:ArgsNode

Returns a Node

Annotations
@Override
getBodyNodeback to summary
public Node getBodyNode()

Implements org.jruby.ast.DefNode.getBodyNode.

Gets the bodyNode.

Returns:Node

Returns a Node

getEndLineback to summary
public int getEndLine()

Implements org.jruby.ast.DefNode.getEndLine.

Doc from org.jruby.ast.DefNode.getEndLine.

Which line if the end keyword located

Returns:int

the line (zero-offset)

getNodeTypeback to summary
public NodeType getNodeType()

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

Returns:NodeType

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

the nodeId

getScopeback to summary
public StaticScope getScope()

Implements org.jruby.ast.DefNode.getScope.

Doc from org.jruby.ast.DefNode.getScope.

Get the static scoping information.

Returns:StaticScope

the scoping info

getVarNodeback to summary
public Node getVarNode()

Gets the varNode.

Returns:Node

Returns a Node