Package studio.magemonkey.codex.util
Class Reflex
java.lang.Object
studio.magemonkey.codex.util.Reflex
Deprecated.
Transitioning to version-specific implementations for better stability
This class interacts with Spigot at a reflection level. This is used to hack some things together but should ultimately be removed for a more stable solution.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> Deprecated.static Class<?> Deprecated.static Constructor<?> getConstructor(Class<?> clazz, Class<?>... types) Deprecated.static Class<?> getCraftClass(String craftClassString) Deprecated.static StringDeprecated.static <T extends Enum>
TDeprecated.static FieldDeprecated.Deprecated.static ObjectgetFieldValue(Object from, String fieldName) Deprecated.static Class<?> getInnerClass(String path, String name) Deprecated.static ObjectgetInstance(Class<?> c, Object... args) Deprecated.Gets an instance of the classstatic MethodDeprecated.static MethodDeprecated.Tries to get a method from the objectstatic Class<?> getNMSClass(String name) Deprecated.static ObjectDeprecated.Tries to get a value from the objectstatic ObjectinvokeConstructor(Constructor<?> con, Object... obj) Deprecated.static ObjectinvokeMethod(Method m, Object by, Object... param) Deprecated.static booleansetFieldValue(Object of, String fieldName, Object value) Deprecated.static voidDeprecated.Tries to set a value for the object
-
Field Details
-
VERSION
Deprecated.
-
-
Constructor Details
-
Reflex
public Reflex()Deprecated.
-
-
Method Details
-
getClass
Deprecated. -
getInnerClass
Deprecated. -
getClass
Deprecated. -
getConstructor
Deprecated. -
invokeConstructor
Deprecated. -
getNMSClass
Deprecated. -
getCraftPackage
Deprecated. -
getCraftClass
Deprecated. -
getFields
Deprecated. -
getField
Deprecated. -
getFieldValue
Deprecated. -
setFieldValue
public static boolean setFieldValue(@NotNull Object of, @NotNull String fieldName, @Nullable Object value) Deprecated. -
getMethod
Deprecated.Tries to get a method from the object- Parameters:
o- object referencemethodName- name of the field to retrieve the value from- Returns:
- the value of the field or null if not found
-
getMethod
@Nullable public static Method getMethod(@NotNull Class<?> clazz, @NotNull String fieldName, @NotNull Class<?>... o) Deprecated. -
invokeMethod
@Nullable public static Object invokeMethod(@NotNull Method m, @Nullable Object by, @Nullable Object... param) Deprecated. -
getEnum
Deprecated. -
setValue
Deprecated.Tries to set a value for the object- Parameters:
o- object referencefieldName- name of the field to setvalue- value to set
-
getValue
Deprecated.Tries to get a value from the object- Parameters:
o- object referencefieldName- name of the field to retrieve the value from- Returns:
- the value of the field or null if not found
-
getInstance
Deprecated.Gets an instance of the class- Parameters:
c- class to get an instance ofargs- constructor arguments- Returns:
- instance of the class or null if unable to create the object
-