Package 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 Description MethodAccessor(Class<?> clazz, String methodName, Class<?>... argTypes)
Checkavailable()
before using instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
available()
Returns true if method is available, otherwise false.Object
callMethod(Object instance, Object... args)
Checkavailable()
before calling to avoid throwing a JogampRuntimeException.
-
-
-
Constructor Detail
-
MethodAccessor
public MethodAccessor(Class<?> clazz, String methodName, Class<?>... argTypes)
Checkavailable()
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)
Checkavailable()
before calling to avoid throwing a JogampRuntimeException.- Throws:
JogampRuntimeException
- if method is not available
-
-