public final class FieldReflection
extends Object
-
Method Summary
static <T> T
static <T> T
static <T> T
static void
static void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
getFieldValue
@Nullable
public static <T> T getFieldValue(@NonNull
Field field,
@Nullable
Object targetObject)
-
getField
@Nullable
public static <T> T getField(@NonNull
Class<?> theClass,
@NonNull
String fieldName,
@Nullable
Object targetObject)
-
getField
@Nullable
public static <T> T getField(@NonNull
Class<?> theClass,
@NonNull
Class<T> fieldType,
@Nullable
Object targetObject)
-
setField
public static void setField(@NonNull
Class<?> theClass,
@Nullable
Object targetObject,
@Nullable
String fieldName,
@Nullable
Object fieldValue)
-
getDeclaredField
@NonNull
public static Field getDeclaredField(@NonNull
Class<?> theClass,
@NonNull
String fieldName,
boolean instanceField)
-
setFieldValue
public static void setFieldValue(@NonNull
Field field,
@Nullable
Object targetObject,
@Nullable
Object value)