org.apache.camel.impl.converter
Class ToStringTypeConverter
java.lang.Object
org.apache.camel.support.TypeConverterSupport
org.apache.camel.impl.converter.ToStringTypeConverter
- All Implemented Interfaces:
- TypeConverter
public class ToStringTypeConverter
- extends TypeConverterSupport
A simple converter that can convert any object to a String type by using the
toString() method of the object.
- Version:
Method Summary |
|
convertTo(Class<T> toType,
Exchange exchange,
Object value)
Converts the value to the specified type in the context of an exchange
Used when conversion requires extra information from the current
exchange (such as encoding). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ToStringTypeConverter
public ToStringTypeConverter()
convertTo
public <T> T convertTo(Class<T> toType,
Exchange exchange,
Object value)
- Description copied from interface:
TypeConverter
- Converts the value to the specified type in the context of an exchange
Used when conversion requires extra information from the current
exchange (such as encoding).
- Parameters:
toType
- the requested typeexchange
- the current exchangevalue
- the value to be converted
- Returns:
- the converted value, or null if not possible to convert
Apache CAMEL