Class ReflectionUtils

java.lang.Object
com.fastasyncworldedit.core.util.ReflectionUtils

public class ReflectionUtils extends Object
This is an internal class not meant to be used outside the FAWE internals.
  • Constructor Details

    • ReflectionUtils

      public ReflectionUtils()
  • Method Details

    • as

      public static <T> T as(Class<T> t, Object o)
    • setAccessibleNonFinal

      public static void setAccessibleNonFinal(Field field)
    • setFailsafeFieldValue

      public static void setFailsafeFieldValue(Field field, Object target, Object value) throws IllegalAccessException
      Throws:
      IllegalAccessException
    • getHandle

      public static Object getHandle(Object wrapper)
    • makeMethod

      public static Method makeMethod(Class<?> clazz, String methodName, Class<?>... parameters)
    • callMethod

      public static <T> T callMethod(Method method, Object instance, Object... parameters)
    • setAccessible

      public static <T extends AccessibleObject> T setAccessible(T ao)
    • getField

      public static <T> T getField(@Nonnull Field field, Object instance)
    • getClass

      public static Class<?> getClass(String name)
    • getClass

      public static <T> Class<? extends T> getClass(String name, Class<T> superClass)
    • unsafeSet

      public static void unsafeSet(Field field, Object base, Object value)
    • getUnsafe

      public static sun.misc.Unsafe getUnsafe()
      Returns:
      an instance of Unsafe