Top Description Fields Constructors Methods
org.jruby.ast

public Class WhileNode

extends Node
Class Inheritance
Imports
java.util.List, org.jruby.ast.visitor.NodeVisitor

Represents a while statement. This could be the both versions: while <condition> <body> end and <body> 'while' <condition>

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
WhileNode(int line, Node conditionNode, Node bodyNode)

public
WhileNode(int line, Node conditionNode, Node bodyNode, boolean evalAtStart)

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 boolean

Returns:

true if you are a while, false if do while
evaluateAtStart
()

Determine whether this is while or do while

public Node

Returns:

Returns a Node
getBodyNode
()

Gets the bodyNode.

public Node

Returns:

Returns a Node
getConditionNode
()

Gets the conditionNode.

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

Field Detail

bodyNodeback to summary
private final Node bodyNode
conditionNodeback to summary
private final Node conditionNode
evaluateAtStartback to summary
private final boolean evaluateAtStart

Constructor Detail

WhileNodeback to summary
public WhileNode(int line, Node conditionNode, Node bodyNode)
WhileNodeback to summary
public WhileNode(int line, Node conditionNode, Node bodyNode, boolean evalAtStart)

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.

evaluateAtStartback to summary
public boolean evaluateAtStart()

Determine whether this is while or do while

Returns:boolean

true if you are a while, false if do while

getBodyNodeback to summary
public Node getBodyNode()

Gets the bodyNode.

Returns:Node

Returns a Node

getConditionNodeback to summary
public Node getConditionNode()

Gets the conditionNode.

Returns:Node

Returns a Node

getNodeTypeback to summary
public NodeType getNodeType()

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

Returns:NodeType

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

the nodeId