java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
com.aoapps.lang.NullArgumentException
- All Implemented Interfaces:
Serializable
Indicates a null argument was passed where not allowed.
- Author:
- AO Industries, Inc.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
checkNotNull
(T argument) Checks an argument and throws an exception if null.static <T> T
checkNotNull
(T argument, String argumentName) Checks an argument and throws an exception if null.Gets the name of the argument that was null.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NullArgumentException
-
-
Method Details
-
checkNotNull
Checks an argument and throws an exception if null.- Throws:
NullArgumentException
-
checkNotNull
Checks an argument and throws an exception if null.- Throws:
NullArgumentException
-
getLocalizedMessage
- Overrides:
getLocalizedMessage
in classThrowable
-
getArgument
Gets the name of the argument that was null.
-