Package org.codehaus.groovy.runtime
Class ReflectionMethodInvoker
- java.lang.Object
-
- org.codehaus.groovy.runtime.ReflectionMethodInvoker
-
public class ReflectionMethodInvoker extends Object
Utility class to call methods through reflection, and falls through using theInvoker
to call the method if it fails. The class is particularly useful for Groovy classes implementingGroovyInterceptable
, since it is not possible to call any method from this class, because it is intercepted by theinvokeMethod()
method.
-
-
Constructor Summary
Constructors Constructor Description ReflectionMethodInvoker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
invoke(Object object, String methodName, Object[] parameters)
Invoke a method through reflection.
-
-
-
Method Detail
-
invoke
public static Object invoke(Object object, String methodName, Object[] parameters)
Invoke a method through reflection. Falls through to using the Invoker to call the method in case the reflection call fails..- Parameters:
object
- the object on which to invoke a methodmethodName
- the name of the method to invokeparameters
- the parameters of the method call- Returns:
- the result of the method call
-
-