org.xins.common.types
Class TypeValueException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.xins.common.types.TypeValueException
All Implemented Interfaces:
Serializable

public class TypeValueException
extends Exception

Exception thrown to indicate a value is invalid for a certain type.

Since:
XINS 1.0.0
Version:
$Revision: 1.10 $ $Date: 2006/08/28 09:12:34 $
Author:
Ernst de Haan
See Also:
Serialized Form

Constructor Summary
TypeValueException(Type type, String value)
          Creates a new TypeValueException.
TypeValueException(Type type, String value, String detail)
          Creates a new TypeValueException.
 
Method Summary
 String getDetail()
          Retrieves the additional detail information passed to the constructor.
 Type getType()
          Retrieves the type.
 String getValue()
          Retrieves the value that was considered invalid.
 
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

TypeValueException

public TypeValueException(Type type,
                          String value)
                   throws IllegalArgumentException
Creates a new TypeValueException.

Parameters:
type - the type, not null.
value - the value, not null.
Throws:
IllegalArgumentException - if type == null || value == null.

TypeValueException

public TypeValueException(Type type,
                          String value,
                          String detail)
                   throws IllegalArgumentException
Creates a new TypeValueException.

Parameters:
type - the type, not null.
value - the value, not null.
detail - additional detail information, can be null.
Throws:
IllegalArgumentException - if type == null || value == null.
Method Detail

getType

public final Type getType()
Retrieves the type.

Returns:
the type, never null.

getValue

public final String getValue()
Retrieves the value that was considered invalid.

Returns:
the value that was considered invalid, not null.

getDetail

public final String getDetail()
Retrieves the additional detail information passed to the constructor. This information is optional.

Returns:
the additional detailed information, can be null.
Since:
XINS 1.2.0


See http://www.xins.org/.