ast
Class NewExpr
java.lang.Object
ast.ASTNode
ast.Expr
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
protected java.lang.String type
- The type to be constructed
NewExpr
public NewExpr(int lineNum,
java.lang.String type)
- NewExpr constructor
- Parameters:
lineNum
- source line number corresponding to this AST nodetype
- the type to be constructed
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 objecto
- object to pass down
- Returns:
- result of visiting this node
- See Also:
Visitor