Class ReflectUtil
java.lang.Object
net.megavex.scoreboardlibrary.implementation.packetAdapter.util.reflect.ReflectUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NotNull ConstructorAccessor<T> findConstructor(@NotNull Class<T> clazz, @NotNull Class<?>... args) static <T,V> @NotNull FieldAccessor <T, V> static <T,V> @NotNull FieldAccessor <T, V> findFieldUnchecked(@NotNull Class<?> clazz, int index, @NotNull Class<?> valueClass) static <T> @Nullable ConstructorAccessor<T> findOptionalConstructor(@NotNull Class<T> clazz, @NotNull Class<?>... args) static @NotNull Class<?> getClassOrThrow(String name) static <T> @NotNull PacketConstructor<T> getEmptyConstructor(@NotNull Class<T> packetClass) static @NotNull ObjectgetEnumInstance(@NotNull Class<?> clazz, @NotNull String name) static @Nullable Class<?> getOptionalClass(String name)
-
Method Details
-
getClassOrThrow
-
getOptionalClass
-
getEnumInstance
-
findField
@NotNull public static <T,V> @NotNull FieldAccessor<T,V> findField(@NotNull @NotNull Class<T> clazz, int index, @NotNull @NotNull Class<V> valueClass) -
findFieldUnchecked
@NotNull public static <T,V> @NotNull FieldAccessor<T,V> findFieldUnchecked(@NotNull @NotNull Class<?> clazz, int index, @NotNull @NotNull Class<?> valueClass) -
findOptionalConstructor
@Nullable public static <T> @Nullable ConstructorAccessor<T> findOptionalConstructor(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull Class<?>... args) -
findConstructor
@NotNull public static <T> @NotNull ConstructorAccessor<T> findConstructor(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull Class<?>... args) -
getEmptyConstructor
@NotNull public static <T> @NotNull PacketConstructor<T> getEmptyConstructor(@NotNull @NotNull Class<T> packetClass)
-