Top Description Constructors Methods
org.jruby.ast

public Class BlockNode

extends ListNode
Class Inheritance
Imports
org.jruby.ast.visitor.NodeVisitor

Represents a block of nodes (read that as list).

Constructor Summary

AccessConstructor and Description
public
BlockNode(int line)

Method Summary

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

Overrides org.jruby.ast.ListNode.accept.

RubyMethod used by visitors.

public boolean
public NodeType
Inherited from org.jruby.ast.ListNode:
addaddAlladdAlladdAlladdAllInternaladdInternalchildNodeschildrengetgetLastisEmptyiteratorsize

Constructor Detail

BlockNodeback to summary
public BlockNode(int line)

Method Detail

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

Overrides org.jruby.ast.ListNode.accept.

RubyMethod used by visitors. accepts the visitor

Parameters
iVisitor:NodeVisitor<T>

the visitor to accept

Annotations
@Override
executesOnceback to summary
public boolean executesOnce()

Overrides org.jruby.ast.Node.executesOnce.

Returns:boolean

Doc from org.jruby.ast.Node.executesOnce.

is it possible this node will execute only once.

Note

This is not comprehensive. It is used to look from root node down to class/module nodes to make sure that narrow case can execute once. It is possible much deeper down the tree some nodes can only execute once but it will be marked as false because that case is not what this is for.

Annotations
@Override
getNodeTypeback to summary
public NodeType getNodeType()

Overrides org.jruby.ast.ListNode.getNodeType.

Returns:NodeType

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

the nodeId