Class VerifyNonNullArgument

java.lang.Object
com.illumon.util.VerifyNonNullArgument

public class VerifyNonNullArgument
extends Object
  • Constructor Details

  • Method Details

    • verifyNonNullArgument

      public static void verifyNonNullArgument​(@NotNull String argName, Object argValue)
      Used to check whether an argument is non-null, and raises an exception if it is null. This is used because Groovy and jpy do not recognize @NotNull annotations in Java code, so such checks in public methods can provide a clearer message about the mistake a user is making when passing an incorrectly null argument.
      Parameters:
      argName - The name to be used in the exception text.
      argValue - The value to check.
      Throws:
      ValidatedArgumentException - if argValue is null.