com.jogamp.common.util

## Class ReflectionUtil.MethodAccessor

- java.lang.Object
- - com.jogamp.common.util.ReflectionUtil.MethodAccessor

- Enclosing class:
    ReflectionUtil

      public static class ReflectionUtil.MethodAccessor
      extends Object

  Convenient Method access class

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReflectionUtil.MethodAccessor(Class<?> clazz, String methodName, Class<?>... argTypes)` Check `available()` before using instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `available()` Returns true if method is available, otherwise false.
    `Object` | `callMethod(Object instance, Object... args)` Check `available()` before calling to avoid throwing a JogampRuntimeException.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReflectionUtil.MethodAccessor

          public ReflectionUtil.MethodAccessor(Class<?> clazz,
                                       String methodName,
                                       Class<?>... argTypes)

      Check `available()` before using instance.

  - ### Method Detail

    - #### available

          public boolean available()

      Returns true if method is available, otherwise false.

    - #### callMethod

          public Object callMethod(Object instance,
                          Object... args)

      Check `available()` before calling to avoid throwing a JogampRuntimeException.
      Throws:
        `JogampRuntimeException` - if method is not available