Package org.jruby.ast
Class CaseNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.CaseNode
A Case statement. Represents a complete case statement, including the body with its
when statements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Nodethe case expression.private final ListNodeA list of all choices including elseprivate NodeFields inherited from class org.jruby.ast.Node
containsVariableAssignment, EMPTY_LIST, newline -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(NodeVisitor<T> iVisitor) Accept for the visitor pattern.Gets the caseNode.getCases()voidsetElseNode(Node elseNode) Methods inherited from class org.jruby.ast.Node
containsVariableAssignment, createList, createList, createList, createList, executesOnce, findFirstChild, getFile, getLine, getNodeName, isNewline, isNil, needsDefinitionCheck, setLine, setNewline, toString, toString, toStringExtraInfo, toStringInternal, unsetNewline
-
Field Details
-
caseNode
the case expression. -
cases
A list of all choices including else -
elseNode
-
-
Constructor Details
-
CaseNode
-
-
Method Details
-
setElseNode
-
getNodeType
- Specified by:
getNodeTypein classNode- Returns:
- the nodeId
-
accept
Accept for the visitor pattern. -
getCaseNode
Gets the caseNode. caseNode is the case expression- Returns:
- caseNode
-
getCases
-
getElseNode
-
childNodes
- Specified by:
childNodesin classNode
-