info.aduna.lang
Class VarargsNullValueException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
info.aduna.lang.VarargsNullValueException
- All Implemented Interfaces:
- Serializable
public class VarargsNullValueException
- extends IllegalArgumentException
Extension of IllegalArgumentException indicating that a null value
has been supplied as the value of a vararg parameter to a method that expects
a non-null value. A common cause of this problem is when null is
used in a method call without a cast to the vararg's element type. By
default, the Java compiler will interpret the null value to an
array of the vararg's element type.
- Author:
- Herko ter Horst, Arjohn Kampman
- See Also:
- Serialized Form
|
Method Summary |
static
|
throwIfNull(E... vararg)
Throws a VarargsNullValueException if the supplied argument is
null. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
VarargsNullValueException
public VarargsNullValueException()
- Construct a new VarargsNullValueException with a default message intended
to explain the most likely fix for this exception.
VarargsNullValueException
public VarargsNullValueException(String s)
throwIfNull
public static <E> void throwIfNull(E... vararg)
throws VarargsNullValueException
- Throws a VarargsNullValueException if the supplied argument is
null.
- Throws:
VarargsNullValueException
Copyright © 1997-2008 Aduna. All Rights Reserved.