Package org.jruby.ast

Class PatternCaseNode

java.lang.Object
org.jruby.ast.Node
org.jruby.ast.PatternCaseNode

public class PatternCaseNode extends Node
A Case statement. Represents a complete case statement, including the body with its when statements.
  • Constructor Details

    • PatternCaseNode

      public PatternCaseNode(int line, Node caseNode, ListNode cases)
  • Method Details

    • setElseNode

      public void setElseNode(Node elseNode)
    • getNodeType

      public NodeType getNodeType()
      Specified by:
      getNodeType in class Node
      Returns:
      the nodeId
    • accept

      public <T> T accept(NodeVisitor<T> iVisitor)
      Accept for the visitor pattern.
      Specified by:
      accept in class Node
      Parameters:
      iVisitor - the visitor
    • getCaseNode

      public Node getCaseNode()
      Gets the caseNode. caseNode is the case expression
      Returns:
      caseNode
    • getCases

      public Node[] getCases()
    • getElseNode

      public Node getElseNode()
    • childNodes

      public List<Node> childNodes()
      Specified by:
      childNodes in class Node