|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fraid.function.ComplexFunction
public abstract class ComplexFunction
The Java interface to the FrAid functions. Every FrAid function is a ComplexFunction.
| Field Summary | |
|---|---|
protected java.lang.String |
mName
|
protected int |
mNumberOfArguments
How many arguments the particular function needs. |
| Constructor Summary | |
|---|---|
ComplexFunction()
Creates a new ComplexFunction instance. |
|
ComplexFunction(int aNumberOfArguments)
Creates a new ComplexFunction instance. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Used when a panel is cloned to be saved in a file. |
Complex |
exec(java.lang.Object... args)
The scripting interface of the Complex Functions. |
java.lang.String |
getDependancies()
On what other definitions this function depends. |
java.lang.String |
getName()
|
int |
getNumberOfArguments()
How many arguments this function takes. |
java.lang.String |
getSignature()
The signature of the function... |
abstract Complex |
invoke(Complex[] args)
The actual call to the function. |
void |
setName(java.lang.String aFunctionName)
|
void |
setNumberOfArguments(int aNumberOfArguments)
|
java.lang.String |
toString()
The String representataion (DefinedFunction gives you back the complete definition). |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int mNumberOfArguments
protected java.lang.String mName
| Constructor Detail |
|---|
public ComplexFunction()
ComplexFunction instance.
public ComplexFunction(int aNumberOfArguments)
ComplexFunction instance.
Use when defining a FrAid function (subclassing ComplexFunction)
from a scripting environment. In some of them although they let you subclass
won't let you override protected members (like getNumberOfArguments).
So from their constructor call super( my_functions_number_of_arguments )
aNumberOfArguments - an int value| Method Detail |
|---|
public int getNumberOfArguments()
int valuepublic void setNumberOfArguments(int aNumberOfArguments)
public java.lang.String getName()
public void setName(java.lang.String aFunctionName)
public Complex exec(java.lang.Object... args)
throws java.lang.Exception
Complex value
java.lang.Exception - if an error occurs
public abstract Complex invoke(Complex[] args)
throws java.lang.Exception
args - the arguments, can be (and usualy are) SimpleNode's
Complex value
java.lang.Exception - if an error occursSimpleNode
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.ObjectObject value
java.lang.CloneNotSupportedException - if an error occurspublic java.lang.String getSignature()
String valuepublic java.lang.String toString()
toString in class java.lang.ObjectString valueDefinedFunctionpublic java.lang.String getDependancies()
String valueDefinedFunction
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||