Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openjava.ptree
Class SwitchStatement  view SwitchStatement download SwitchStatement.java

java.lang.Object
  extended byopenjava.ptree.ParseTreeObject
      extended byopenjava.ptree.NonLeaf
          extended byopenjava.ptree.SwitchStatement
All Implemented Interfaces:
java.lang.Cloneable, ParseTree, Statement

public class SwitchStatement
extends NonLeaf
implements Statement

The SwitchStatement class represents switch statement node of parse tree.
The specification around CaseGroupList may be modified in the later version of OpenJava.


Field Summary
 
Fields inherited from class openjava.ptree.NonLeaf
 
Fields inherited from class openjava.ptree.ParseTreeObject
LN
 
Constructor Summary
(package private) SwitchStatement()
           
  SwitchStatement(Expression expr, CaseGroupList cglist)
          Allocates a new object.
 
Method Summary
 void accept(openjava.ptree.util.ParseTreeVisitor v)
          Accepts a ParseTreeVisitor object as the role of a Visitor in the Visitor pattern, as the role of an Element in the Visitor pattern.
 CaseGroupList getCaseGroupList()
          Gets the case group list.
 Expression getExpression()
          Gets the expression of the condition to switch.
 void setCaseGroupList(CaseGroupList cglist)
          Sets the case group list.
 void setExpression(Expression expr)
          Sets the expression of the condition to switch.
 
Methods inherited from class openjava.ptree.NonLeaf
childrenAccept, elementAt, equals, getComment, getContents, getLength, makeRecursiveCopy, replaceChildWith, set, set, set, set, set, set, set, set, set, setComment, setElementAt
 
Methods inherited from class openjava.ptree.ParseTreeObject
clone, equal, getObjectID, getParent, hashCode, lastObjectID, makeCopy, replace, setParent, toFlattenString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface openjava.ptree.ParseTree
childrenAccept, equals, getObjectID, makeCopy, makeRecursiveCopy, replace, toFlattenString, toString
 

Constructor Detail

SwitchStatement

public SwitchStatement(Expression expr,
                       CaseGroupList cglist)
Allocates a new object.


SwitchStatement

SwitchStatement()
Method Detail

getExpression

public Expression getExpression()
Gets the expression of the condition to switch.


setExpression

public void setExpression(Expression expr)
Sets the expression of the condition to switch.


getCaseGroupList

public CaseGroupList getCaseGroupList()
Gets the case group list.


setCaseGroupList

public void setCaseGroupList(CaseGroupList cglist)
Sets the case group list.


accept

public void accept(openjava.ptree.util.ParseTreeVisitor v)
            throws ParseTreeException
Description copied from interface: ParseTree
Accepts a ParseTreeVisitor object as the role of a Visitor in the Visitor pattern, as the role of an Element in the Visitor pattern.

This invoke an appropriate visit() method on the accepted visitor.

Specified by:
accept in interface ParseTree
Specified by:
accept in class ParseTreeObject