public abstract class Function
extends java.lang.Object
Function
class defines the standard framework of any
Dawn function. A function is defined by its name, the one which will
be used to call it from scripts. The function also provides an
invoke()
method which can throw a DawnRuntimeException
on error.Constructor and Description |
---|
Function()
Creates a new Dawn function, unnamed.
|
Function(java.lang.String name)
Creates a new Dawn function.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHelp()
Returns the help associated with this function.
|
java.lang.String |
getName()
Returns the function name.
|
void |
invoke(DawnParser parser)
Executes the function.
|
public Function()
public Function(java.lang.String name)
name
- The function namepublic java.lang.String getHelp()
public java.lang.String getName()
String
, containing the namepublic void invoke(DawnParser parser) throws DawnRuntimeException
DawnParser
given as parameter.parser
- The DawnParser
which inoked the functionA
- DawnRuntimeException
if an error occuresDawnRuntimeException
Copyright ? 2002 Romain Guy.