org.boris.xlloop.reflect
Class ReflectFunctionHandler

java.lang.Object
  extended by org.boris.xlloop.reflect.ReflectFunctionHandler
All Implemented Interfaces:
FunctionProvider, IFunctionHandler

public class ReflectFunctionHandler
extends java.lang.Object
implements IFunctionHandler, FunctionProvider


Constructor Summary
ReflectFunctionHandler()
           
 
Method Summary
 void addInformation(java.lang.String name, FunctionInformation fi)
           
 void addMethod(java.lang.Object instance, java.lang.reflect.Method m)
           
 void addMethod(java.lang.String name, java.lang.Class c, java.lang.Object instance, java.lang.reflect.Method m)
           
 void addMethods(java.lang.String namespace, java.lang.Class c)
           
 void addMethods(java.lang.String namespace, java.lang.Object instance)
           
 XLoper execute(IFunctionContext context, java.lang.String name, XLoper[] args)
           
 java.util.Set getFunctionList()
           
 FunctionInformation[] getFunctions()
           
 boolean hasFunction(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectFunctionHandler

public ReflectFunctionHandler()
Method Detail

getFunctionList

public java.util.Set getFunctionList()

addMethod

public void addMethod(java.lang.Object instance,
                      java.lang.reflect.Method m)

addInformation

public void addInformation(java.lang.String name,
                           FunctionInformation fi)

addMethod

public void addMethod(java.lang.String name,
                      java.lang.Class c,
                      java.lang.Object instance,
                      java.lang.reflect.Method m)

addMethods

public void addMethods(java.lang.String namespace,
                       java.lang.Class c)

addMethods

public void addMethods(java.lang.String namespace,
                       java.lang.Object instance)

execute

public XLoper execute(IFunctionContext context,
                      java.lang.String name,
                      XLoper[] args)
               throws RequestException
Specified by:
execute in interface IFunctionHandler
Throws:
RequestException

hasFunction

public boolean hasFunction(java.lang.String name)
Specified by:
hasFunction in interface IFunctionHandler

getFunctions

public FunctionInformation[] getFunctions()
Specified by:
getFunctions in interface FunctionProvider