|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectast.ASTNode
ast.Formal
public class Formal
The Formal class represents a formal parameter declaration appearing in a method declaration. It contains a variable type (type ), and a name (name).
ASTNode
Field Summary | |
---|---|
protected java.lang.String |
name
The name of the formal parameter |
protected java.lang.String |
type
The type of the formal parameter |
Fields inherited from class ast.ASTNode |
---|
charNum, lineNum, lineStr |
Constructor Summary | |
---|---|
Formal(int lineNum,
java.lang.String type,
java.lang.String name)
Formal constructor |
Method Summary | |
---|---|
java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method |
java.lang.String |
getName()
Get the name of the formal parameter |
java.lang.String |
getType()
Get the type of the formal parameter |
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 |
---|
protected java.lang.String type
protected java.lang.String name
Constructor Detail |
---|
public Formal(int lineNum, java.lang.String type, java.lang.String name)
lineNum
- source line number corresponding to this AST nodetype
- the type of the formal parametername
- the name of the formal parameterMethod Detail |
---|
public java.lang.String getType()
public java.lang.String getName()
public java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
accept
in class ASTNode
v
- visitor objecto
- object to pass down
Visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |