cetus.hir
Class SwitchStatement

java.lang.Object
  extended by cetus.hir.Statement
      extended by cetus.hir.SwitchStatement
All Implemented Interfaces:
Annotatable, Printable, Traversable, java.lang.Cloneable

public class SwitchStatement
extends Statement


Field Summary
 
Fields inherited from class cetus.hir.Statement
annotations, children, line_number, object_print_method, parent
 
Constructor Summary
SwitchStatement(Expression value)
          Create a new switch statement.
SwitchStatement(Expression value, CompoundStatement stmt)
           
 
Method Summary
static void defaultPrint(SwitchStatement stmt, java.io.OutputStream stream)
          Prints a switch statement to a stream.
 CompoundStatement getBody()
           
 Expression getExpression()
           
 void setBody(CompoundStatement stmt)
           
static void setClassPrintMethod(java.lang.reflect.Method m)
          Overrides the class print method, so that all subsequently created objects will use the supplied method.
 void setExpression(Expression value)
           
 java.lang.String toString()
          Returns a string representation of this statement; every child class should implement this method.
 
Methods inherited from class cetus.hir.Statement
annotate, annotateAfter, annotateBefore, annotationToString, clone, containsAnnotation, detach, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getChildren, getParent, getProcedure, print, removeAnnotations, removeAnnotations, removeChild, setChild, setLineNumber, setParent, setPrintMethod, swapWith, toAnnotatedString, verify, where
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SwitchStatement

public SwitchStatement(Expression value)
Create a new switch statement.


SwitchStatement

public SwitchStatement(Expression value,
                       CompoundStatement stmt)
Method Detail

defaultPrint

public static void defaultPrint(SwitchStatement stmt,
                                java.io.OutputStream stream)
Prints a switch statement to a stream.

Parameters:
stmt - The statement to print.
stream - The stream on which to print the statement.

toString

public java.lang.String toString()
Description copied from class: Statement
Returns a string representation of this statement; every child class should implement this method.

Specified by:
toString in class Statement

getBody

public CompoundStatement getBody()

getExpression

public Expression getExpression()

setBody

public void setBody(CompoundStatement stmt)

setExpression

public void setExpression(Expression value)

setClassPrintMethod

public static void setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently created objects will use the supplied method.

Parameters:
m - The new print method.