org.jrubyparser.ast
Class CaseNode

java.lang.Object
  extended by org.jrubyparser.ast.Node
      extended by org.jrubyparser.ast.CaseNode
All Implemented Interfaces:
ISourcePositionHolder

public class CaseNode
extends Node

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


Constructor Summary
CaseNode(SourcePosition position, Node caseNode, ListNode cases)
           
 
Method Summary
 Object accept(NodeVisitor iVisitor)
          Accept for the visitor pattern.
 Node getCase()
          Gets the caseNode.
 Node getCaseNode()
          Deprecated. 
 ListNode getCases()
           
 Node getElse()
           
 Node getElseNode()
          Deprecated. 
 Node getFirstWhen()
          Gets the first whenNode.
 Node getFirstWhenNode()
          Deprecated. 
 NodeType getNodeType()
           
 boolean isSame(Node node)
          Checks node for 'sameness' for diffing.
 void setElseNode(Node elseNode)
           
 
Methods inherited from class org.jrubyparser.ast.Node
adopt, adopt, adoptUsingNodesPosition, childNodes, comparePositionWith, createList, getClosestIScope, getClosestModule, getGrandParent, getInlineComment, getInnermostIter, getMethodFor, getNodeAt, getNodeName, getOutermostIter, getParent, getPosition, getPositionIncludingComments, getPreviousComments, insertAfter, insertAll, insertBefore, insertNode, isBlockParameter, isDescendentOf, isLeaf, isMethodParameter, setParent, setPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CaseNode

public CaseNode(SourcePosition position,
                Node caseNode,
                ListNode cases)
Method Detail

setElseNode

public void setElseNode(Node elseNode)

isSame

public boolean isSame(Node node)
Checks node for 'sameness' for diffing.

Overrides:
isSame in class Node
Parameters:
node - to be compared to
Returns:
Returns a boolean

getNodeType

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

accept

public Object accept(NodeVisitor iVisitor)
Accept for the visitor pattern.

Specified by:
accept in class Node
Parameters:
iVisitor - the visitor

getCase

public Node getCase()
Gets the caseNode. caseNode is the case expression

Returns:
caseNode

getCaseNode

@Deprecated
public Node getCaseNode()
Deprecated. 


getCases

public ListNode getCases()

getElse

public Node getElse()

getElseNode

@Deprecated
public Node getElseNode()
Deprecated. 


getFirstWhen

public Node getFirstWhen()
Gets the first whenNode. the body of the case statement, the first of a list of WhenNodes

Returns:
whenNode

getFirstWhenNode

@Deprecated
public Node getFirstWhenNode()
Deprecated. 



Copyright © 2013. All Rights Reserved.