Class ReflectionUtil

java.lang.Object
wbs.utils.util.ReflectionUtil

public final class ReflectionUtil extends Object
Deprecated.
Abandoned
Reflection based utilities.
  • 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 on
      clazz - The class of the return type
      getterName - 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