public class ReflectionWrapperInvocable extends AbstractInvocable
Constructor and Description |
---|
ReflectionWrapperInvocable(java.lang.Object obj)
Constructor
|
ReflectionWrapperInvocable(java.lang.Object obj,
boolean useReflect)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canInvoke(java.lang.String functionName,
java.lang.Object[] args)
whether the function can be invoke with the arguments
|
InvocableFunction |
getFunction(java.lang.String functionName,
java.lang.Object[] args)
Get the function
|
java.lang.Object |
invoke(java.lang.String functionName,
java.lang.Object[] args)
invoke the function with the arguments provided
|
addFunction, getFunction, getFunctions
public ReflectionWrapperInvocable(java.lang.Object obj)
obj
- the wrappeepublic ReflectionWrapperInvocable(java.lang.Object obj, boolean useReflect)
obj
- the wrappeeuseReflect
- whether to use reflectionpublic boolean canInvoke(java.lang.String functionName, java.lang.Object[] args)
canInvoke
in interface Invocable
canInvoke
in class AbstractInvocable
functionName
- the function nameargs
- the argumentspublic InvocableFunction getFunction(java.lang.String functionName, java.lang.Object[] args)
getFunction
in interface Invocable
getFunction
in class AbstractInvocable
functionName
- the function nameargs
- the argumentspublic java.lang.Object invoke(java.lang.String functionName, java.lang.Object[] args) throws java.lang.Exception
invoke
in interface Invocable
invoke
in class AbstractInvocable
functionName
- the function nameargs
- the argumentsjava.lang.Exception
- if there's problem invoking the function