org.apache.camel
Class TypeConversionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.camel.RuntimeCamelException
                  extended by org.apache.camel.TypeConversionException
All Implemented Interfaces:
Serializable

public class TypeConversionException
extends RuntimeCamelException

Exception when failing during type conversion.

Version:
See Also:
Serialized Form

Constructor Summary
TypeConversionException(Object value, Class<?> type, Throwable cause)
           
 
Method Summary
static String createMessage(Object value, Class<?> type, Throwable cause)
          Returns an error message for type conversion failed.
 Class<?> getFromType()
          Returns the required from type.
 Class<?> getToType()
          Returns the required to type
 Object getValue()
          Returns the value which could not be converted
 
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

TypeConversionException

public TypeConversionException(Object value,
                               Class<?> type,
                               Throwable cause)
Method Detail

getValue

public Object getValue()
Returns the value which could not be converted


getToType

public Class<?> getToType()
Returns the required to type


getFromType

public Class<?> getFromType()
Returns the required from type. Returns null if the provided value was null.


createMessage

public static String createMessage(Object value,
                                   Class<?> type,
                                   Throwable cause)
Returns an error message for type conversion failed.



Apache CAMEL