cetus.hir
Class NullStatement
java.lang.Object
cetus.hir.Statement
cetus.hir.NullStatement
- All Implemented Interfaces:
- Annotatable, Printable, Traversable, java.lang.Cloneable
public class NullStatement
- extends Statement
Represents an empty statement. Empty statements need
to be preserved by the IR because there are some coding
"tricks" that rely on them. For example, because a label
must appear before a statement, there is no way of putting
a label at the end of a block, so it's common to find a labeled
null statement there.
|
Constructor Summary |
NullStatement()
Create a new break statement. |
|
Method Summary |
static void |
defaultPrint(NullStatement stmt,
java.io.OutputStream stream)
Prints a null statement to a stream. |
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 |
NullStatement
public NullStatement()
- Create a new break statement.
defaultPrint
public static void defaultPrint(NullStatement stmt,
java.io.OutputStream stream)
- Prints a null 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
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.