public class Reflection extends Object
Constructor and Description |
---|
Reflection() |
Modifier and Type | Method and Description |
---|---|
static Class<?> |
getCallerClass() |
static <T> Class<? extends T> |
getCallerClass(Class<T> type) |
static Class<?> |
getCallerClass(int up)
find callers class
|
static StackTraceElement |
getCallerElement() |
static StackTraceElement |
getCallerElement(int up) |
static boolean |
tryCallMain(Class<?> cls,
String[] args) |
public static Class<?> getCallerClass(int up)
up
- levels upwards from our caller (NOT counting ourselves)public static Class<?> getCallerClass()
public static StackTraceElement getCallerElement(int up)
public static StackTraceElement getCallerElement()
public static boolean tryCallMain(Class<?> cls, String[] args) throws InvocationTargetException
InvocationTargetException