ast
Class NewArrayExpr

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

public class NewArrayExpr
extends Expr

The NewArrayExpr class represents a new array expression (constructing new arrays). It contains a type name (type) to be constructed and a size expression (size).

See Also:
ASTNode, Expr

Field Summary
protected  Expr size
          The size of the constructed array
protected  java.lang.String type
          The type of the constructed array
 
Fields inherited from class ast.ASTNode
charNum, lineNum, lineStr
 
Constructor Summary
NewArrayExpr(int lineNum, java.lang.String type, Expr size)
          NewArrayExpr constructor
 
Method Summary
 java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
          Visitor method
 Expr getSize()
          Get the construction size expression
 java.lang.String getType()
          Get the type of the constructed array
 
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 of the constructed array


size

protected Expr size
The size of the constructed array

Constructor Detail

NewArrayExpr

public NewArrayExpr(int lineNum,
                    java.lang.String type,
                    Expr size)
NewArrayExpr constructor

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

getType

public java.lang.String getType()
Get the type of the constructed array

Returns:
type

getSize

public Expr getSize()
Get the construction size expression

Returns:
size expression

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