public class NullArgumentException
extends java.lang.NullPointerException
null argument has been passed to a method
that requires a non-null argument. Convention dictates that a
NullPointerException be thrown in this case. This subclass of
NullPointerException allows this case of a null argument to
be distinguished from a NullPointerException within the method that
is not related to a null argument. This distinction may be useful,
for example, to an automatic bug filer so it can file the bug against the
caller of the method, rather than against the method itself.| Constructor and Description |
|---|
NullArgumentException()
Constructs an instance with no detail message.
|
NullArgumentException(java.lang.String message)
Constructs an instance with a detail message.
|
NullArgumentException(java.lang.String message,
int apiDepth)
Construct an instance with a detail message and API depth.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getApiDepth()
Get the API depth of this exception.
|
public NullArgumentException(java.lang.String message,
int apiDepth)
message - the messageapiDepth - the stack depth of the callerpublic NullArgumentException(java.lang.String message)
message - the detail messagepublic NullArgumentException()