org.outerj.expression
Class DefaultFunctionFactory

java.lang.Object
  extended byorg.outerj.expression.DefaultFunctionFactory
All Implemented Interfaces:
FunctionFactory

public class DefaultFunctionFactory
extends java.lang.Object
implements FunctionFactory

Function factory which knows all the standard functions, and to which additional functions can be registered.


Field Summary
protected  java.util.HashMap functions
           
protected static FunctionFactory instance
           
 
Constructor Summary
DefaultFunctionFactory()
           
 
Method Summary
 Expression createFunction(java.lang.String name)
          Returns null if there is no expression with the given name.
static FunctionFactory getInstance()
           
 void registerFunction(java.lang.String name, java.lang.Class clazz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static FunctionFactory instance

functions

protected java.util.HashMap functions
Constructor Detail

DefaultFunctionFactory

public DefaultFunctionFactory()
Method Detail

getInstance

public static FunctionFactory getInstance()

registerFunction

public void registerFunction(java.lang.String name,
                             java.lang.Class clazz)

createFunction

public Expression createFunction(java.lang.String name)
                          throws java.lang.Exception
Description copied from interface: FunctionFactory
Returns null if there is no expression with the given name.

Specified by:
createFunction in interface FunctionFactory
Throws:
java.lang.Exception