Package org.apache.camel.support
Class TypeConverterSupport
java.lang.Object
org.apache.camel.support.TypeConverterSupport
- All Implemented Interfaces:
org.apache.camel.TypeConverter
Base class for
TypeConverter implementations.
Implementators need only to implement the TypeConverter.convertTo(Class, org.apache.camel.Exchange, Object)
method, and can rely on the default implementations of the other methods from this support class.-
Field Summary
Fields inherited from interface org.apache.camel.TypeConverter
MISS_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean<T> T<T> TmandatoryConvertTo(Class<T> type, Object value) <T> TmandatoryConvertTo(Class<T> type, org.apache.camel.Exchange exchange, Object value) <T> TtryConvertTo(Class<T> type, Object value) <T> TtryConvertTo(Class<T> type, org.apache.camel.Exchange exchange, Object value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.TypeConverter
convertTo
-
Constructor Details
-
TypeConverterSupport
public TypeConverterSupport()
-
-
Method Details
-
allowNull
public boolean allowNull()- Specified by:
allowNullin interfaceorg.apache.camel.TypeConverter
-
convertTo
- Specified by:
convertToin interfaceorg.apache.camel.TypeConverter- Throws:
org.apache.camel.TypeConversionException
-
mandatoryConvertTo
public <T> T mandatoryConvertTo(Class<T> type, Object value) throws org.apache.camel.TypeConversionException, org.apache.camel.NoTypeConversionAvailableException - Specified by:
mandatoryConvertToin interfaceorg.apache.camel.TypeConverter- Throws:
org.apache.camel.TypeConversionExceptionorg.apache.camel.NoTypeConversionAvailableException
-
mandatoryConvertTo
public <T> T mandatoryConvertTo(Class<T> type, org.apache.camel.Exchange exchange, Object value) throws org.apache.camel.TypeConversionException, org.apache.camel.NoTypeConversionAvailableException - Specified by:
mandatoryConvertToin interfaceorg.apache.camel.TypeConverter- Throws:
org.apache.camel.TypeConversionExceptionorg.apache.camel.NoTypeConversionAvailableException
-
tryConvertTo
- Specified by:
tryConvertToin interfaceorg.apache.camel.TypeConverter
-
tryConvertTo
- Specified by:
tryConvertToin interfaceorg.apache.camel.TypeConverter
-