Package wbs.utils.util
Class ReflectionUtil
java.lang.Object
wbs.utils.util.ReflectionUtil
Deprecated.
Abandoned
Reflection based utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TcallGetterIfValid(@NotNull Object obj, @NotNull Class<T> clazz) Deprecated.static <T> TcallGetterIfValid(@NotNull Object obj, @NotNull Class<T> clazz, @NotNull String getterName) Deprecated.Invoke a method that takes no parameters and returns an object of type T
-
Method Details
-
callGetterIfValid
@Nullable public static <T> T callGetterIfValid(@NotNull @NotNull Object obj, @NotNull @NotNull Class<T> clazz) Deprecated. -
callGetterIfValid
@Nullable public static <T> T callGetterIfValid(@NotNull @NotNull Object obj, @NotNull @NotNull Class<T> clazz, @NotNull @NotNull String getterName) Deprecated.Invoke a method that takes no parameters and returns an object of type T- Type Parameters:
T- The return type- Parameters:
obj- The object to invoke the method onclazz- The class of the return typegetterName- The name of the method to invoke- Returns:
- The result of invoking the method, or null if:
- The result of the invocation was itself null, or
- The method specified by the given name did not exist on the object, or
- Another, unspecified exception is thrown
-