|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.tomp.xtcl.command.AbstractCommand
net.sf.tomp.xtcl.command.Function
public class Function
Function command
Field Summary | |
---|---|
protected Command |
command
the command itself |
protected java.lang.String |
name
Function name |
protected java.lang.String[] |
params
Function formal param names |
Constructor Summary | |
---|---|
Function()
|
Method Summary | |
---|---|
int |
execute(Context context)
execute the function command means execute its command |
java.lang.String |
getName()
|
java.lang.String |
getParam(int i)
Get the i-th formal param name |
void |
setCommand(Command c)
sets the command representing the function |
void |
setName(java.lang.String p)
sets the function name |
void |
setParams(java.lang.String[] p)
sets the function's parameter names |
java.lang.String |
toString()
|
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand |
---|
done, initParameters, listArray, listList, listMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.lang.String[] params
protected Command command
Constructor Detail |
---|
public Function()
Method Detail |
---|
public int execute(Context context) throws java.lang.Exception
execute
in interface Command
execute
in class AbstractCommand
context
-
java.lang.Exception
public void setName(java.lang.String p)
p
- the function namepublic void setParams(java.lang.String[] p)
p
- the function's parameter namespublic void setCommand(Command c)
c
- the commandpublic java.lang.String getParam(int i)
i
- formal param index
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |