Modifier and Type | Field and Description |
---|---|
protected Expr |
init
The (optional) initialization expression for the field (instance variable)
|
protected java.lang.String |
name
The name of the field (instance variable)
|
protected java.lang.String |
type
The type of the field (instance variable)
|
Constructor and Description |
---|
Field(int lineNum,
java.lang.String type,
java.lang.String name,
Expr init)
Field constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method
|
Expr |
getInit()
Get the initialization expression of the field
|
java.lang.String |
getName()
Get the name of the field
|
java.lang.String |
getType()
Get the type of the field
|
getLineNum
protected java.lang.String type
protected java.lang.String name
protected Expr init
public Field(int lineNum, java.lang.String type, java.lang.String name, Expr init)
lineNum
- source line number corresponding to this AST nodetype
- the type of the field (instance variable)name
- the name of the field (instance variable)init
- the (optional) initialization expression for the field
(instance variable)public java.lang.String getType()
public java.lang.String getName()
public Expr getInit()