org.apache.geronimo.common
Class NullArgumentException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byjava.lang.IllegalArgumentException
                  extended byorg.apache.geronimo.common.InvalidArgumentException
                      extended byorg.apache.geronimo.common.NullArgumentException
All Implemented Interfaces:
Serializable

public class NullArgumentException
extends InvalidArgumentException

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

Version:
$Revision: 1.11 $ $Date: 2004/03/10 09:58:25 $
See Also:
Serialized Form

Constructor Summary
NullArgumentException(String name)
          Construct a NullArgumentException.
NullArgumentException(String name, long index)
          Construct a NullArgumentException.
NullArgumentException(String name, Object index)
          Construct a NullArgumentException.
 
Method Summary
static void checkForNull(String name, Object value)
          A simple helper method to check that the given argument value is not null.
 
Methods inherited from class org.apache.geronimo.common.InvalidArgumentException
getIndex, getName, getValue
 
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
 

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.
Method Detail

checkForNull

public static void checkForNull(String name,
                                Object value)
                         throws NullArgumentException
A simple helper method to check that the given argument value is not null. If it is null then a NullArgumentException is thrown.

Parameters:
name - name of the argument
value - the value of the argument
Throws:
NullArgumentException - if the argument is null


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.