Package com.scriptbasic.utility
Class ReflectionUtility
- java.lang.Object
-
- com.scriptbasic.utility.ReflectionUtility
-
public class ReflectionUtility extends java.lang.Object- Author:
- Peter Verhas date Aug 2, 2012
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Objectinvoke(Interpreter interpreter, java.lang.String symbolicName, java.lang.reflect.Method method, java.lang.Object object, java.util.List<RightValue> args)Invoke themethodon theobjectusing theargs.
-
-
-
Method Detail
-
invoke
public static java.lang.Object invoke(Interpreter interpreter, java.lang.String symbolicName, java.lang.reflect.Method method, java.lang.Object object, java.util.List<RightValue> args) throws ScriptBasicException
Invoke themethodon theobjectusing theargs.If
objectisnullthen call the static method.If
objectis of a type that implements the interfaceNoAccessthen the call will fail.Before the Java method call the hook method
beforeCallJavaFunctionis called.After the Java method call the hook method
afterCallJavaFunctionis called.- Parameters:
interpreter- the interpretersymbolicName- the symbolic name of the method, as it is used in the BASIC level. This is used only for error reporting.method- the method to callobject- the object on which the call is to be performed ornullin case the method is staticargs- the arguments to the method call- Returns:
- the object returned by the Java method if any.
- Throws:
ScriptBasicException- in case of exception
-
-