|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjoptsimple.internal.Reflection
public class Reflection
Helper methods for reflection.
Constructor Summary | |
---|---|
protected |
Reflection()
|
Method Summary | |
---|---|
static java.lang.reflect.Member |
findConverter(java.lang.Class clazz)
Finds an appropriate value converter for the given class. |
private static java.lang.reflect.Constructor |
findConverterConstructor(java.lang.Class clazz)
|
private static java.lang.reflect.Method |
findConverterMethod(java.lang.Class clazz)
|
static java.lang.Object |
invokeQuietly(java.lang.reflect.Constructor constructor,
java.lang.Object[] args)
Invokes the given constructor with the given args. |
static java.lang.Object |
invokeStaticQuietly(java.lang.reflect.Method method,
java.lang.Object[] args)
Invokes the given static method with the given args. |
private static boolean |
matchesConverterRequirements(java.lang.reflect.Method method,
java.lang.Class expectedReturnType)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Reflection()
Method Detail |
---|
public static java.lang.reflect.Member findConverter(java.lang.Class clazz)
clazz
- class to introspect on
private static java.lang.reflect.Method findConverterMethod(java.lang.Class clazz)
private static boolean matchesConverterRequirements(java.lang.reflect.Method method, java.lang.Class expectedReturnType)
private static java.lang.reflect.Constructor findConverterConstructor(java.lang.Class clazz)
public static java.lang.Object invokeQuietly(java.lang.reflect.Constructor constructor, java.lang.Object[] args)
constructor
- constructor to invokeargs
- arguments to hand to the constructor
ReflectionException
- in lieu of the gaggle of reflection-related exceptionspublic static java.lang.Object invokeStaticQuietly(java.lang.reflect.Method method, java.lang.Object[] args)
method
- method to invokeargs
- arguments to hand to the method
ReflectionException
- in lieu of the gaggle of reflection-related exceptions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |