Top Description Constructors Methods
org.codehaus.groovy.runtime

public Class ReflectionMethodInvoker

extends Object
Class Inheritance
Imports
java.lang.reflect.Method

Utility class to call methods through reflection, and falls through using the Invoker to call the method if it fails. The class is particularly useful for Groovy classes implementing GroovyInterceptable, since it is not possible to call any method from this class, because it is intercepted by the invokeMethod() method.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Object

Returns:

the result of the method call
invoke
(Object
the object on which to invoke a method
object
,
String
the name of the method to invoke
methodName
,
Object[]
the parameters of the method call
parameters
)

Invoke a method through reflection.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ReflectionMethodInvokerback to summary
public ReflectionMethodInvoker()

Method Detail

invokeback to summary
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:Object

the object on which to invoke a method

methodName:String

the name of the method to invoke

parameters:Object[]

the parameters of the method call

Returns:Object

the result of the method call