org.jext.dawn
Class Function

java.lang.Object
  extended byorg.jext.dawn.Function
Direct Known Subclasses:
AddElementFunction, AndFunction, ArcCosFunction, ArcSinFunction, ArcTanFunction, ArrayFunction, BinAndFunction, BinOrFunction, CharAtFunction, ChrFunction, ClassFunction, ClearArrayFunction, ClearFunction, CloseFileFunction, ConcatFunction, ConsoleFunction, ConstructorFunction, ConstructPathFunction, CosFunction, CreateActionFunction, CreateFunction, CreateGlobalFunction, DateFunction, DecreaseFunction, DepthFunction, DifferentFromFunction, DivideFunction, DoLoopFunction, DropFunction, DropnFunction, DumpFunction, DupFunction, DupnFunction, EFunction, ElementAtFunction, ElementsFunction, EndsWithFunction, EqualsFunction, ErrMsgFunction, ErrorFunction, EvalFunction, ExecFunction, ExistFunction, ExitFunction, FactFunction, FieldFunction, FileSizeFunction, ForFunction, FormattedDateFunction, FromLiteralFunction, FromStringFunction, GetPropertyFunction, GetSelectedTextFunction, GetTextFunction, GetTypeFunction, GreaterEqualsFunction, GreaterThanFunction, HeadFunction, HelpFunction, IfFunction, IncreaseFunction, InputFunction, InputLineFunction, InsertElementAtFunction, InsertTextFunction, InvokeFunction, IsArrayFunction, IsAvailableFunction, IsLiteralFunction, IsNumericFunction, IsPropertyEnabledFunction, IsStringFunction, JextActionFunction, LastPosFunction, LengthFunction, LineSeparatorFunction, LowerCaseFunction, LowerEqualsFunction, LowerThanFunction, MethodFunction, MinusFunction, ModuloFunction, MsgBoxFunction, NDupFunction, NewFunction, NotFunction, NullFunction, NumFunction, OpenFunction, OpenInputFunction, OpenOutputFunction, OrFunction, PickFunction, PiFunction, PlusFunction, PosFunction, PowerFunction, PrintFunction, PrintlnFunction, RandomFunction, RandomizeFunction, RclFunction, RdzFunction, ReadFunction, ReadLineFunction, RemoveElementAtFunction, ReverseFunction, RollDownFunction, RollFunction, RoundFunction, SameFunction, ScriptExecFunction, SetElementAtFunction, SetFunction, SetPropertyFunction, SetTextFunction, SinFunction, SizeFunction, SqrtFunction, StartsWithFunction, StoFunction, SubFunction, SwapFunction, TailFunction, TanFunction, TimeFunction, TimesFunction, TokenizeDelimFunction, TokenizeFunction, ToLiteralFunction, ToStringFunction, TrimFunction, TryCatchFunction, UpperCaseFunction, VersionFunction, WaitFunction, WhileFunction, WriteFunction, WriteLineFunction, XorFunction, YesNoCancelFunction, YesNoFunction

public abstract class Function
extends java.lang.Object

The 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.

Author:
Romain Guy

Constructor Summary
Function()
          Creates a new Dawn function, unnamed.
Function(java.lang.String name)
          Creates a new Dawn function.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Function

public Function()
Creates a new Dawn function, unnamed.


Function

public Function(java.lang.String name)
Creates a new Dawn function.

Parameters:
name - The function name
Method Detail

getHelp

public java.lang.String getHelp()
Returns the help associated with this function.


getName

public java.lang.String getName()
Returns the function name. The returned name is the name which must be called in a script to invoke the function.

Returns:
A String, containing the name

invoke

public void invoke(DawnParser parser)
            throws DawnRuntimeException
Executes the function. Usually, the function should make use of the DawnParser given as parameter.

Parameters:
parser - The DawnParser which inoked the function
Throws:
A - DawnRuntimeException if an error occures
DawnRuntimeException


Copyright ? 2002 Romain Guy.