Class NullArgumentException

  • All Implemented Interfaces:
    java.io.Serializable

    public class NullArgumentException
    extends java.lang.IllegalArgumentException
    Thrown to indicate that a method argument was null and should not have been.
    Version:
    $Revision$
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object index
      The index of the argument or null if no index.
      protected java.lang.String name
      The name of the argument that was null.
      private static long serialVersionUID
      The serialVersionUID
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getArgumentIndex()
      Get the argument index.
      java.lang.String getArgumentName()
      Get the argument name that was null.
      private static java.lang.String makeMessage​(java.lang.String name)
      Make a execption message for the argument name.
      private static java.lang.String makeMessage​(java.lang.String name, java.lang.Object index)
      Make a execption message for the argument name and index
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        The serialVersionUID
        See Also:
        Constant Field Values
      • name

        protected final java.lang.String name
        The name of the argument that was null.
      • index

        protected final java.lang.Object index
        The index of the argument or null if no index.
    • Constructor Detail

      • NullArgumentException

        public NullArgumentException​(java.lang.String name)
        Construct a NullArgumentException.
        Parameters:
        name - Argument name.
      • NullArgumentException

        public NullArgumentException​(java.lang.String name,
                                     long index)
        Construct a NullArgumentException.
        Parameters:
        name - Argument name.
        index - Argument index.
      • NullArgumentException

        public NullArgumentException​(java.lang.String name,
                                     java.lang.Object index)
        Construct a NullArgumentException.
        Parameters:
        name - Argument name.
        index - Argument index.
      • NullArgumentException

        public NullArgumentException()
        Construct a NullArgumentException.
    • Method Detail

      • getArgumentName

        public final java.lang.String getArgumentName()
        Get the argument name that was null.
        Returns:
        The argument name that was null.
      • getArgumentIndex

        public final java.lang.Object getArgumentIndex()
        Get the argument index.
        Returns:
        The argument index.
      • makeMessage

        private static java.lang.String makeMessage​(java.lang.String name)
        Make a execption message for the argument name.
      • makeMessage

        private static java.lang.String makeMessage​(java.lang.String name,
                                                    java.lang.Object index)
        Make a execption message for the argument name and index