|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.onemind.commons.invoke.AbstractInvocable
org.onemind.commons.invoke.ReflectionWrapperInvocable
public class ReflectionWrapperInvocable
An wrapper invocable that will use reflection to optionally use reflection for invocation if possible
Constructor Summary | |
---|---|
ReflectionWrapperInvocable(java.lang.Object obj)
Constructor |
|
ReflectionWrapperInvocable(java.lang.Object obj,
boolean useReflect)
Constructor |
Method Summary | |
---|---|
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 |
Methods inherited from class org.onemind.commons.invoke.AbstractInvocable |
---|
addFunction, getFunction, getFunctions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectionWrapperInvocable(java.lang.Object obj)
obj
- the wrappeepublic ReflectionWrapperInvocable(java.lang.Object obj, boolean useReflect)
obj
- the wrappeeuseReflect
- whether to use reflectionMethod Detail |
---|
public boolean canInvoke(java.lang.String functionName, java.lang.Object[] args)
canInvoke
in interface Invocable
canInvoke
in class AbstractInvocable
functionName
- the function nameargs
- the arguments
public InvocableFunction getFunction(java.lang.String functionName, java.lang.Object[] args)
getFunction
in interface Invocable
getFunction
in class AbstractInvocable
functionName
- the function nameargs
- the arguments
public 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 arguments
java.lang.Exception
- if there's problem invoking the function
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |