Top Description Fields Constructors Methods
org.jruby.ast

public Class CaseNode

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

A Case statement. Represents a complete case statement, including the body with its when statements.

Field Summary

Modifier and TypeField and Description
private final Node
caseNode

the case expression.

private final ListNode
cases

A list of all choices including else

private Node
Inherited from org.jruby.ast.Node:
containsVariableAssignmentEMPTY_LISTnewline

Constructor Summary

AccessConstructor and Description
public
CaseNode(int line, Node caseNode, ListNode cases)

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:

caseNode
getCaseNode
()

Gets the caseNode.

public ListNode
public Node
public NodeType
public void
setElseNode(Node elseNode)

Inherited from org.jruby.ast.Node:
containsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNameisNewlineisNilneedsDefinitionChecksetLinesetNewlinetoStringtoStringtoStringExtraInfotoStringInternalunsetNewline

Field Detail

caseNodeback to summary
private final Node caseNode

the case expression.

casesback to summary
private final ListNode cases

A list of all choices including else

elseNodeback to summary
private Node elseNode

Constructor Detail

CaseNodeback to summary
public CaseNode(int line, Node caseNode, ListNode cases)

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.

getCaseNodeback to summary
public Node getCaseNode()

Gets the caseNode. caseNode is the case expression

Returns:Node

caseNode

getCasesback to summary
public ListNode getCases()
getElseNodeback to summary
public Node getElseNode()
getNodeTypeback to summary
public NodeType getNodeType()

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

Returns:NodeType

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

the nodeId

setElseNodeback to summary
public void setElseNode(Node elseNode)