Module org.tquadrat.foundation.base
Class NullArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.tquadrat.foundation.exception.ValidationException
org.tquadrat.foundation.exception.NullArgumentException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BlankArgumentException
,EmptyArgumentException
@ClassVersion(sourceVersion="$Id: NullArgumentException.java 1060 2023-09-24 19:21:40Z tquadrat $")
@API(status=STABLE,
since="0.0.5")
public sealed class NullArgumentException
extends ValidationException
permits BlankArgumentException, EmptyArgumentException
This is a specialized implementation for the
IllegalArgumentException
that should be used instead of the latter in cases where null
is
provided as an illegal argument value.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: NullArgumentException.java 1060 2023-09-24 19:21:40Z tquadrat $
- Since:
- 0.0.5
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.exception.NullArgumentException"
-
Field Summary
Fields inherited from class org.tquadrat.foundation.exception.ValidationException
MSG_ValidationFailed
-
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates a new instance ofNullArgumentException
.NullArgumentException
(String argName) Creates a new instance ofNullArgumentException
.NullArgumentException
(String argName1, String argName2) Creates a new instance ofNullArgumentException
.protected
NullArgumentException
(String argName, String msgName, String msgNone) Creates a new instance ofNullArgumentException
. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NullArgumentException
public NullArgumentException()Creates a new instance ofNullArgumentException
. -
NullArgumentException
Creates a new instance ofNullArgumentException
.- Parameters:
argName
- The name of the argument whose value was provided asnull
; ifnull
or the empty String, a default message is used that does not use the name of the argument.
-
NullArgumentException
Creates a new instance ofNullArgumentException
.- Parameters:
argName1
- The name of the first argument whose value was provided asnull
.argName2
- The name of the second argument whose value was provided asnull
.- See Also:
-
NullArgumentException
Creates a new instance of
NullArgumentException
.This constructor was introduced for the
EmptyArgumentException
.- Parameters:
argName
- The name of the argument whose value was provided asnull
; ifnull
or the empty String, a default message is used that does not use the name of the argument.msgName
- The regular message.msgNone
- The default message.
-