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

## org.crosswire.common.util
Class ReflectionUtil

    java.lang.Object
      org.crosswire.common.util.ReflectionUtil

    public final class ReflectionUtil

extends Object

Various utilities for running introspected methods.

Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Constructor Summary
`private` | `ReflectionUtil()` Prevent Instansiation

Method Summary
`static Object` | `invoke(Object base, String methodName, Object[] params)` Call a method on a class given a sting
`static Object` | `invoke(String call, Object[] params)` Call a static method on a class given a sting

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

Constructor Detail

### ReflectionUtil

    private ReflectionUtil()

  Prevent Instansiation

Method Detail

### invoke

    public static Object invoke(Object base,
                                String methodName,
                                Object[] params)
                         throws NoSuchMethodException,
                                IllegalAccessException,
                                InvocationTargetException

  Call a method on a class given a sting

  Parameters:
    `base` - The object to invoke a method on
    `methodName` - The text of the invocation eg "getName"
    `params` - For example new Object[] { ...}
  Throws:
    `NoSuchMethodException`
    `IllegalAccessException`
    `InvocationTargetException`

### invoke

    public static Object invoke(String call,
                                Object[] params)
                         throws ClassNotFoundException,
                                NoSuchMethodException,
                                IllegalAccessException,
                                InvocationTargetException

  Call a static method on a class given a sting

  Parameters:
    `call` - The text of the invocation eg "java.lang.String.getName"
    `params` - For example new Object[] { ...}
  Throws:
    `ClassNotFoundException`
    `NoSuchMethodException`
    `IllegalAccessException`
    `InvocationTargetException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD