Package com.illumon.util
Class VerifyNonNullArgument
java.lang.Object
com.illumon.util.VerifyNonNullArgument
public class VerifyNonNullArgument extends Object
-
Constructor Summary
Constructors Constructor Description VerifyNonNullArgument()
-
Method Summary
Modifier and Type Method Description static void
verifyNonNullArgument(String argName, Object argValue)
Used to check whether an argument is non-null, and raises an exception if it is null.
-
Constructor Details
-
VerifyNonNullArgument
public VerifyNonNullArgument()
-
-
Method Details
-
verifyNonNullArgument
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.
-