cetus.hir
Class SizeofExpression

java.lang.Object
  extended by cetus.hir.Expression
      extended by cetus.hir.SizeofExpression
All Implemented Interfaces:
Intrinsic, Printable, Traversable, java.lang.Cloneable, java.lang.Comparable<Expression>

public class SizeofExpression
extends Expression
implements Intrinsic


Field Summary
 
Fields inherited from class cetus.hir.Expression
children, needs_parens, object_print_method, parent
 
Constructor Summary
SizeofExpression(Expression expr)
           
SizeofExpression(java.util.List pspecs)
           
 
Method Summary
static void defaultPrint(SizeofExpression expr, java.io.OutputStream stream)
          Prints a sizeof expression to a stream.
 Expression getExpression()
          Returns the expression.
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()
          Every expression class should override toString method.
 
Methods inherited from class cetus.hir.Expression
clone, compareTo, equals, equals2, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verify
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SizeofExpression

public SizeofExpression(Expression expr)

SizeofExpression

public SizeofExpression(java.util.List pspecs)
Method Detail

defaultPrint

public static void defaultPrint(SizeofExpression expr,
                                java.io.OutputStream stream)
Prints a sizeof expression to a stream.

Parameters:
expr - The expression to print.
stream - The stream on which to print the expression.

toString

public java.lang.String toString()
Description copied from class: Expression
Every expression class should override toString method.

Overrides:
toString in class Expression

getExpression

public Expression getExpression()
Returns the expression.

Specified by:
getExpression in interface Intrinsic
Returns:
the expression or null if this sizeof operator is being applied to a type.

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.