org.jboss.util
Class NullArgumentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalArgumentException
                  extended by org.jboss.util.NullArgumentException
All Implemented Interfaces:
Serializable

public class NullArgumentException
extends IllegalArgumentException

Thrown to indicate that a method argument was null and should not have been.

Version:
$Revision: 1.2 $
Author:
Jason Dillon
See Also:
Serialized Form

Field Summary
protected  Object index
          The index of the argument or null if no index.
protected  String name
          The name of the argument that was null.
 
Constructor Summary
NullArgumentException()
          Construct a NullArgumentException.
NullArgumentException(String name)
          Construct a NullArgumentException.
NullArgumentException(String name, long index)
          Construct a NullArgumentException.
NullArgumentException(String name, Object index)
          Construct a NullArgumentException.
 
Method Summary
 Object getArgumentIndex()
          Get the argument index.
 String getArgumentName()
          Get the argument name that was null.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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

name

protected final String name
The name of the argument that was null.


index

protected final Object index
The index of the argument or null if no index.

Constructor Detail

NullArgumentException

public NullArgumentException(String name)
Construct a NullArgumentException.

Parameters:
name - Argument name.

NullArgumentException

public NullArgumentException(String name,
                             long index)
Construct a NullArgumentException.

Parameters:
name - Argument name.
index - Argument index.

NullArgumentException

public NullArgumentException(String name,
                             Object index)
Construct a NullArgumentException.

Parameters:
name - Argument name.
index - Argument index.

NullArgumentException

public NullArgumentException()
Construct a NullArgumentException.

Method Detail

getArgumentName

public final String getArgumentName()
Get the argument name that was null.

Returns:
The argument name that was null.

getArgumentIndex

public final Object getArgumentIndex()
Get the argument index.

Returns:
The argument index.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.