Package org.onemind.commons.invoke
Interface Invocable
-
- All Known Implementing Classes:
AbstractInvocable
,ReflectionWrapperInvocable
public interface Invocable
An interface for a object provide information about functions that can be invoked on itself (through a key) and API for invoke the method on on itself- Version:
- $Id: Invocable.java,v 1.2 2004/08/26 16:08:23 thlee Exp $ $Name: $
- Author:
- TiongHiang Lee (thlee@onemindsoft.org)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canInvoke(java.lang.String functionName, java.lang.Object[] args)
whether the function can be invoke with the argumentsInvocableFunction
getFunction(java.lang.String functionName, java.lang.Object[] args)
Get the functionjava.lang.Object
invoke(java.lang.String functionName, java.lang.Object[] args)
invoke the function with the arguments provided
-
-
-
Method Detail
-
canInvoke
boolean canInvoke(java.lang.String functionName, java.lang.Object[] args)
whether the function can be invoke with the arguments- Parameters:
functionName
- the function nameargs
- the arguments- Returns:
- true if can invoke
-
getFunction
InvocableFunction getFunction(java.lang.String functionName, java.lang.Object[] args)
Get the function- Parameters:
functionName
- the function nameargs
- the arguments- Returns:
- the function, or null if the function cannot be found
-
invoke
java.lang.Object invoke(java.lang.String functionName, java.lang.Object[] args) throws java.lang.Exception
invoke the function with the arguments provided- Parameters:
functionName
- the function nameargs
- the arguments- Returns:
- the object returns from the invocation
- Throws:
java.lang.Exception
- if there's problem invoking the function
-
-