Package co.crystaldev.alpinecore.util
Class ReflectionHelper
java.lang.Object
co.crystaldev.alpinecore.util.ReflectionHelper
- Since:
- 0.3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Field
static @Nullable Method
findMethod
(@NotNull Class<?> clazz, @NotNull String[] methodNames, @NotNull Class<?>... parameterTypes) static @Nullable Method
findMethod
(@NotNull Class<?> clazz, @NotNull String methodName, @NotNull Class<?>... parameterTypes) getClass
(@NotNull ClassLoader loader, @NotNull String className) getClass
(@NotNull ClassLoader loader, @NotNull String... classNames) static @NotNull ClassLoader
static <T,
E> T getPrivateValue
(@NotNull Class<? super E> classToAccess, E instance, @NotNull String... fieldNames) static <R> R
invokeMethod
(@NotNull Class<R> returnType, @NotNull Method method, @Nullable Object source, @Nullable Object... parameters) static <R> R
invokeMethod
(@NotNull Method method, @Nullable Object source, @Nullable Object... parameters) static <T,
E> void setPrivateValue
(@NotNull Class<? super T> classToAccess, T instance, E value, @NotNull String... fieldNames)
-
Constructor Details
-
ReflectionHelper
public ReflectionHelper()
-
-
Method Details
-
findField
-
getPrivateValue
-
setPrivateValue
-
getContextClassLoader
-
getClass
@Nullable public static @Nullable Class<? super Object> getClass(@NotNull @NotNull ClassLoader loader, @NotNull @NotNull String... classNames) -
getClass
@Nullable public static @Nullable Class<? super Object> getClass(@NotNull @NotNull ClassLoader loader, @NotNull @NotNull String className) -
findMethod
-
findMethod
-
invokeMethod
-
invokeMethod
-