Package org.eclipse.net4j.util
Klasse ReflectUtil
java.lang.Object
org.eclipse.net4j.util.ReflectUtil
Various static helper methods for dealing with Java reflection.
- Seit:
- 3.14
- Autor:
- Eike Stepper
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic @interface
Annotates fields that are to be skipped inReflectUtil.collectFields()
andReflectUtil.toString()
.static enum
static class
static final class
-
Feldübersicht
Felder -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic void
appendStackTrace
(StringBuilder builder, StackTraceElement[] stackTrace) static void
collectFields
(Class<?> c, List<Field> fields) static void
static void
static void
dump
(Object object, String prefix, PrintStream out) static void
dump
(Object object, Predicate<ReflectUtil.Setting> consumer) static String
dumpToArray
(Object object) static Field
getAccessibleField
(Class<?> c, String fieldName) Veraltet.static Field
static Field
getFieldOrNull
(Class<?> c, String fieldName) static Field
getFieldOrNullSafe
(Class<?> c, String fieldName) static Integer
getHashCode
(Object object) static Long
static String
static Method
static Method
getMethodOrNull
(Class<?> c, String methodName, Class<?>... parameterTypes) static Method
getMethodOrNullSafe
(Class<?> c, String methodName, Class<?>... parameterTypes) static String
getPackageName
(Class<? extends Object> c) static String
getPackageName
(String className) static String
getSimpleClassName
(Object object) static String
getSimpleClassName
(String name) static String
getSimpleName
(Class<? extends Object> c) static Object
static <T> T
static Object
instantiate
(Map<Object, Object> properties, String namespace, String classKey, ClassLoader classLoader) static Object
invokeMethod
(Method method, Object target, Object... arguments) static <T> T
invokeMethod
(String methodName, Object target) static boolean
static boolean
isSetterName
(String name) static <T> void
makeAccessible
(AccessibleObject accessibleObject) static void
Prints the stack trace of the current thread toSystem.err
.static void
printStackTrace
(PrintStream out, StackTraceElement[] stackTrace) static void
printStackTrace
(StackTraceElement[] stackTrace) static void
static void
static String
static String
-
Felddetails
-
ROOT_CLASS
-
NO_PARAMETERS
-
NO_ARGUMENTS
-
REMEMBER_IDS
public static boolean REMEMBER_IDS- Seit:
- 3.3
-
DUMP_STATICS
public static boolean DUMP_STATICS
-
-
Methodendetails
-
makeAccessible
- Seit:
- 3.12
-
getMethod
-
getMethodOrNull
- Seit:
- 3.20
-
getMethodOrNullSafe
- Seit:
- 3.28
-
invokeMethod
-
invokeMethod
- Seit:
- 3.14
-
getField
-
getFieldOrNull
- Seit:
- 3.28
-
getFieldOrNullSafe
- Seit:
- 3.28
-
getAccessibleField
Veraltet.As of 3.14 usegetField(Class, String)
.- Seit:
- 3.8
-
collectFields
-
getValue
-
getValue
- Seit:
- 3.14
-
setValue
-
setValue
- Seit:
- 3.14
-
dumpThread
- Seit:
- 3.8
-
appendStackTrace
- Seit:
- 3.11
-
printStackTrace
-
printStackTrace
-
printStackTrace
public static void printStackTrace()Prints the stack trace of the current thread toSystem.err
.- Seit:
- 3.4
-
getHashCode
-
getID
-
getPackageName
-
getPackageName
-
getSimpleName
-
getSimpleClassName
-
getSimpleClassName
-
getLabel
-
dump
-
dump
-
dump
-
dump
- Seit:
- 3.22
-
dumpToArray
-
instantiate
public static Object instantiate(Map<Object, Object> properties, String namespace, String classKey, ClassLoader classLoader) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException -
isSetter
-
isSetterName
-
toString
-
toString
-
getField(Class, String)
.