cetus.hir
Class NewExpression

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

public class NewExpression
extends Expression


Field Summary
protected static boolean global
          If blobal == true, it prints "::" before printing the new expression.
 
Fields inherited from class cetus.hir.Expression
children, needs_parens, object_print_method, parent
 
Constructor Summary
NewExpression(java.util.List specs)
           
NewExpression(java.util.List specs, Initializer init)
           
 
Method Summary
 void clearGlobal()
          disable printing "::"
 java.lang.Object clone()
          Creates and returns a deep copy of this expression.
static void defaultPrint(NewExpression expr, java.io.OutputStream stream)
          Prints a new expression to a stream.
 boolean isGlobal()
          returns true if it is set to be global.
 void setGlobal()
          force printing "::"
 java.lang.String toString()
          Every expression class should override toString method.
 
Methods inherited from class cetus.hir.Expression
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
 

Field Detail

global

protected static boolean global
If blobal == true, it prints "::" before printing the new expression. It doesn't print "::" by default.

Constructor Detail

NewExpression

public NewExpression(java.util.List specs)

NewExpression

public NewExpression(java.util.List specs,
                     Initializer init)
Method Detail

setGlobal

public void setGlobal()
force printing "::"


clearGlobal

public void clearGlobal()
disable printing "::"


isGlobal

public boolean isGlobal()
returns true if it is set to be global.


clone

public java.lang.Object clone()
Description copied from class: Expression
Creates and returns a deep copy of this expression.

Overrides:
clone in class Expression
Returns:
a deep copy of this expression.

defaultPrint

public static void defaultPrint(NewExpression expr,
                                java.io.OutputStream stream)
Prints a new 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