ast
Class NewExpr

java.lang.Object
  extended by ast.ASTNode
      extended by ast.Expr
          extended by ast.NewExpr

public class NewExpr
extends Expr

The NewExpr class represents a new expression (constructing new objects). It contains a type name (type) to be constructed.

See Also:
ASTNode, Expr

Field Summary
protected  java.lang.String type
          The type to be constructed
 
Fields inherited from class ast.ASTNode
charNum, lineNum, lineStr
 
Constructor Summary
NewExpr(int lineNum, java.lang.String type)
          NewExpr constructor
 
Method Summary
 java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
          Visitor method
 java.lang.String getType()
          Get the type to be constructed
 
Methods inherited from class ast.Expr
getExprType, setExprType
 
Methods inherited from class ast.ASTNode
getLineNum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected java.lang.String type
The type to be constructed

Constructor Detail

NewExpr

public NewExpr(int lineNum,
               java.lang.String type)
NewExpr constructor

Parameters:
lineNum - source line number corresponding to this AST node
type - the type to be constructed
Method Detail

getType

public java.lang.String getType()
Get the type to be constructed

Returns:
type

accept

public java.lang.Object accept(visitor.Visitor v,
                               java.lang.Object o)
Visitor method

Specified by:
accept in class Expr
Parameters:
v - visitor object
o - object to pass down
Returns:
result of visiting this node
See Also:
Visitor