cetus.hir
Class Case

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

public class Case
extends Statement

Represents a case for use with switch.


Field Summary
 
Fields inherited from class cetus.hir.Statement
annotations, children, line_number, object_print_method, parent
 
Constructor Summary
Case(Expression expr)
          Create a new case.
 
Method Summary
static void defaultPrint(Case label, java.io.OutputStream stream)
          Prints a case label to a stream.
 Expression getExpression()
           
static void setClassPrintMethod(java.lang.reflect.Method m)
          Overrides the class print method, so that all subsequently created objects will use the supplied method.
 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

Case

public Case(Expression expr)
Create a new case.

Parameters:
expr - The expression that activates the case.
Method Detail

defaultPrint

public static void defaultPrint(Case label,
                                java.io.OutputStream stream)
Prints a case label to a stream.

Parameters:
label - The case label to print.
stream - The stream on which to print the case label.

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

getExpression

public Expression getExpression()

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.