SmartFrog 3.10.000

org.smartfrog.sfcore.languages.sf.functions
Class BaseFunction

java.lang.Object
  extended by org.smartfrog.sfcore.languages.sf.functions.BaseFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
Append, BaseBinaryOperator, BaseOperator, BaseUnaryOperator, Date, Format, IfThenElse, Next, Random, Ref, UserInput, Vector

public abstract class BaseFunction
extends java.lang.Object
implements Function

Defines the base function for all the functions.


Field Summary
protected  Context context
           
protected  Reference name
           
 
Constructor Summary
BaseFunction()
           
 
Method Summary
protected abstract  java.lang.Object doFunction()
          The method to implement the functionality of any function.
 java.lang.Object doit(Context context, Reference name)
          base implementation of a fubction method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected Context context

name

protected Reference name
Constructor Detail

BaseFunction

public BaseFunction()
Method Detail

doFunction

protected abstract java.lang.Object doFunction()
                                        throws SmartFrogCompileResolutionException
The method to implement the functionality of any function.

Returns:
the result of the function: an Object
Throws:
SmartFrogCompileResolutionException

doit

public java.lang.Object doit(Context context,
                             Reference name)
                      throws SmartFrogCompileResolutionException
base implementation of a fubction method. Calls the (abstract) method doFunction. Note that it makes sure that the result has no parent if it is a component description - this will cause it to be patched into whereever it is returned.

Specified by:
doit in interface Function
Parameters:
context - A context that contains all the parameters
Throws:
SmartFrogCompileResolutionException - if the doFunction method does.

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP