|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.ast.Node edu.ksu.cis.projects.bogor.ast.SystemMember edu.ksu.cis.projects.bogor.ast.Fun
public final class Fun
Fun AST.
Field Summary |
---|
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
ILLEGAL_LOCAL_ID_CHAR |
Constructor Summary | |
---|---|
Fun(String id,
List<TypedId> params,
ASTType returnType,
Exp exp)
Default constructor. |
Method Summary | |
---|---|
Fun |
clone()
Clones this object (deep clone); including location info. |
void |
dispose()
Disposes returnType. |
Exp |
getExp()
Gets the exp. |
String |
getId()
Gets the id. |
TypedId |
getParam(int index)
Gets the param at a specified index. |
int |
getParamCount()
Gets the number of params. |
ASTType |
getReturnType()
Gets the return type. |
void |
setExp(Exp newExp)
Sets the exp. |
void |
setId(String newId)
Sets the function id. |
void |
setParams(List<TypedId> newParams)
Sets the params. |
void |
setReturnType(ASTType newReturnType)
Sets the return type. |
String |
toString()
Returns the string representation of this object. |
void |
visit(ASTVisitor visitor)
|
Methods inherited from class edu.ksu.cis.projects.bogor.ast.SystemMember |
---|
getParent, setParent |
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
getLocationInfo, getProperty, putProperty, setLocationInfo |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Fun(String id, List<TypedId> params, ASTType returnType, Exp exp)
id
- The id.params
- The params. Must be non-null. Each element must be instance of
Param.returnType
- The return type. Must be non-null.Method Detail |
---|
public void setExp(Exp newExp)
newExp
- The new exp. Must be non-null.public Exp getExp()
public void setId(String newId)
newId
- The new function id. Must be non-null.public String getId()
public TypedId getParam(int index)
index
- The index of the param. Must be between 0 and getParamCount() -
1, inclusive.
public int getParamCount()
public void setParams(List<TypedId> newParams)
newParams
- The new params. Must be non-null. Each element must be
instance ofTypedId.public void setReturnType(ASTType newReturnType)
newReturnType
- The new return type. Must be non-null.public ASTType getReturnType()
public Fun clone()
clone
in class SystemMember
public void dispose()
dispose
in interface Disposable
dispose
in class SystemMember
public String toString()
toString
in class Node
" fun id( ( params , )* ) returns returnType = \n" + " exp;"
public void visit(ASTVisitor visitor)
visit
in class Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |