org.apache.camel.impl.converter
Class StaticMethodFallbackTypeConverter
java.lang.Object
org.apache.camel.support.TypeConverterSupport
org.apache.camel.impl.converter.StaticMethodFallbackTypeConverter
- All Implemented Interfaces:
- TypeConverter
public class StaticMethodFallbackTypeConverter
- extends TypeConverterSupport
A TypeConverter
implementation which invokes a static method
as a fallback type converter from a type to another type
- Version:
Method Summary |
|
convertTo(Class<T> type,
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). |
String |
toString()
|
StaticMethodFallbackTypeConverter
public StaticMethodFallbackTypeConverter(Method method,
TypeConverterRegistry registry)
toString
public String toString()
- Overrides:
toString
in class Object
convertTo
public <T> T convertTo(Class<T> type,
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:
type
- the requested typeexchange
- the current exchangevalue
- the value to be converted
- Returns:
- the converted value, or null if not possible to convert
Apache CAMEL