com.jogamp.common.util
Class ReflectionUtil.MethodAccessor

java.lang.Object
  extended by com.jogamp.common.util.ReflectionUtil.MethodAccessor
Enclosing class:
ReflectionUtil

public static class ReflectionUtil.MethodAccessor
extends Object

Convenient Method access class


Constructor Summary
ReflectionUtil.MethodAccessor(Class<?> clazz, String methodName, Class<?>... argTypes)
          Check available() before using instance.
 
Method Summary
 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