org.jruby.ast
Class WhileNode

java.lang.Object
  extended byorg.jruby.ast.AbstractNode
      extended byorg.jruby.ast.WhileNode
All Implemented Interfaces:
INode, java.io.Serializable

public class WhileNode
extends AbstractNode

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

Version:
$Revision: 1.5 $
Author:
jpetersen
See Also:
Serialized Form

Constructor Summary
WhileNode(ISourcePosition position, INode conditionNode, INode bodyNode)
           
WhileNode(ISourcePosition position, INode conditionNode, INode bodyNode, boolean evalAtStart)
           
 
Method Summary
 void accept(INodeVisitor iVisitor)
          Accept for the visitor pattern.
 boolean evaluateAtStart()
          Determine whether this is while or do while
 INode getBodyNode()
          Gets the bodyNode.
 INode getConditionNode()
          Gets the conditionNode.
 
Methods inherited from class org.jruby.ast.AbstractNode
getPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhileNode

public WhileNode(ISourcePosition position,
                 INode conditionNode,
                 INode bodyNode)

WhileNode

public WhileNode(ISourcePosition position,
                 INode conditionNode,
                 INode bodyNode,
                 boolean evalAtStart)
Method Detail

accept

public void accept(INodeVisitor iVisitor)
Accept for the visitor pattern.

Parameters:
iVisitor - the visitor

getBodyNode

public INode getBodyNode()
Gets the bodyNode.

Returns:
Returns a INode

getConditionNode

public INode getConditionNode()
Gets the conditionNode.

Returns:
Returns a INode

evaluateAtStart

public boolean evaluateAtStart()
Determine whether this is while or do while

Returns:
true if you are a while, false if do while


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.