Top Description Fields Constructors Methods
org.jruby.ast

public Class IfNode

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

an 'if' statement.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
IfNode(int line, Node condition, Node thenBody, Node elseBody)

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 Node

Returns:

Returns a Node
getCondition
()

Gets the condition.

public Node

Returns:

Returns a Node
getElseBody
()

Gets the elseBody.

public NodeType
public Node

Returns:

Returns a Node
getThenBody
()

Gets the thenBody.

Inherited from org.jruby.ast.Node:
containsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNameisNewlineisNilneedsDefinitionChecksetLinesetNewlinetoStringtoStringtoStringExtraInfotoStringInternalunsetNewline

Field Detail

conditionback to summary
private final Node condition
elseBodyback to summary
private final Node elseBody
thenBodyback to summary
private final Node thenBody

Constructor Detail

IfNodeback to summary
public IfNode(int line, Node condition, Node thenBody, Node elseBody)

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.

getConditionback to summary
public Node getCondition()

Gets the condition.

Returns:Node

Returns a Node

getElseBodyback to summary
public Node getElseBody()

Gets the elseBody.

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

getThenBodyback to summary
public Node getThenBody()

Gets the thenBody.

Returns:Node

Returns a Node