Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 the `Invoker` to call the method if it fails. The class is particularly useful for Groovy classes implementing `GroovyIntercpetable`, since it is not possible to call any method from this class, because it is intercepted by the `invokeMethod()` method.

Author:
  Guillaume Laforge

Constructor Summary
Constructor and Description
`ReflectionMethodInvoker()`

Method Summary
Modifier and Type | Method and Description
--- | ---
`static Object` | `invoke(Object object, String methodName, Object[] parameters)` Invoke a method through reflection.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ReflectionMethodInvoker

    public ReflectionMethodInvoker()

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 method
    `methodName` - the name of the method to invoke
    `parameters` - the parameters of the method call
  Returns:
    the result of the method call

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2003-2010 The Codehaus. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD