Package com.fastasyncworldedit.core.util
Class ReflectionUtils
java.lang.Object
com.fastasyncworldedit.core.util.ReflectionUtils
This is an internal class not meant to be used outside the FAWE internals.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
static <T> T
callMethod
(Method method, Object instance, Object... parameters) static Class<?>
static <T> Class<? extends T>
static <T> T
static Object
static sun.misc.Unsafe
static Method
makeMethod
(Class<?> clazz, String methodName, Class<?>... parameters) static <T extends AccessibleObject>
TsetAccessible
(T ao) static void
setAccessibleNonFinal
(Field field) static void
setFailsafeFieldValue
(Field field, Object target, Object value) static void
-
Constructor Details
-
ReflectionUtils
public ReflectionUtils()
-
-
Method Details
-
as
-
setAccessibleNonFinal
-
setFailsafeFieldValue
public static void setFailsafeFieldValue(Field field, Object target, Object value) throws IllegalAccessException - Throws:
IllegalAccessException
-
getHandle
-
makeMethod
-
callMethod
-
setAccessible
-
getField
-
getClass
-
getClass
-
unsafeSet
-
getUnsafe
public static sun.misc.Unsafe getUnsafe()- Returns:
- an instance of
Unsafe
-