public class IfNode extends Node
| Modifier and Type | Field and Description |
|---|---|
private Node |
condition |
private Node |
elseBody |
private Node |
thenBody |
EMPTY_LIST| Constructor and Description |
|---|
IfNode(ISourcePosition position,
Node condition,
Node thenBody,
Node elseBody) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
accept(NodeVisitor iVisitor)
Accept for the visitor pattern.
|
java.util.List<Node> |
childNodes() |
Node |
getCondition()
Gets the condition.
|
Node |
getElseBody()
Gets the elseBody.
|
NodeType |
getNodeType() |
Node |
getThenBody()
Gets the thenBody.
|
IRubyObject |
interpret(Ruby runtime,
ThreadContext context,
IRubyObject self,
Block aBlock) |
assign, createList, createList, createList, createList, definition, getNodeName, getPosition, isNil, setPosition, toStringprivate final Node condition
private final Node thenBody
private final Node elseBody
public IfNode(ISourcePosition position, Node condition, Node thenBody, Node elseBody)
public NodeType getNodeType()
getNodeType in class Nodepublic java.lang.Object accept(NodeVisitor iVisitor)
public Node getCondition()
public Node getElseBody()
public Node getThenBody()
public java.util.List<Node> childNodes()
childNodes in class Nodepublic IRubyObject interpret(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock)