org.apache.geronimo.common
Class InvalidArgumentException

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
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NullArgumentException

public class InvalidArgumentException
extends IllegalArgumentException

Thrown to inidcate an invalid value used for a method argument.

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

Constructor Summary
InvalidArgumentException(String name, Object value)
          Construct a InvalidArgumentException.
InvalidArgumentException(String name, Object value, Object index, String reason)
          Construct a InvalidArgumentException.
InvalidArgumentException(String name, Object value, String reason)
          Construct a InvalidArgumentException.
 
Method Summary
 Object getIndex()
          Returns the index associated with this argument.
 String getName()
          Returns the name of the argument.
 Object getValue()
          Returns the value of the argument.
 
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

InvalidArgumentException

public InvalidArgumentException(String name,
                                Object value)
Construct a InvalidArgumentException.

Parameters:
name - Argument name.

InvalidArgumentException

public InvalidArgumentException(String name,
                                Object value,
                                String reason)
Construct a InvalidArgumentException.

Parameters:
name - Argument name.

InvalidArgumentException

public InvalidArgumentException(String name,
                                Object value,
                                Object index,
                                String reason)
Construct a InvalidArgumentException.

Parameters:
name - The name of the argument
value - The value of the argument, or null
index - The index of the argument, or null if none.
reason - The reason (short description) of why it is invalid, or null for the default
Method Detail

getIndex

public Object getIndex()
Returns the index associated with this argument. May be null if there is no such index.

Returns:
the index associated with this argument

getName

public String getName()
Returns the name of the argument.

Returns:
the name of the argument

getValue

public Object getValue()
Returns the value of the argument.

Returns:
The value of the argument or null if not specified.


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