public class InstanceMethodTypeConverter extends TypeConverterSupport
TypeConverter implementation which instantiates an object
so that an instance method can be used as a type converter| Constructor and Description |
|---|
InstanceMethodTypeConverter(CachingInjector<?> injector,
Method method,
TypeConverterRegistry registry)
Deprecated.
|
InstanceMethodTypeConverter(CachingInjector<?> injector,
Method method,
TypeConverterRegistry registry,
boolean allowNull) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowNull()
Whether the type converter allows returning null as a valid response.
|
<T> T |
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() |
convertTo, mandatoryConvertTo, mandatoryConvertTo, tryConvertTo, tryConvertTo@Deprecated public InstanceMethodTypeConverter(CachingInjector<?> injector, Method method, TypeConverterRegistry registry)
public InstanceMethodTypeConverter(CachingInjector<?> injector, Method method, TypeConverterRegistry registry, boolean allowNull)
public boolean allowNull()
TypeConverterallowNull in interface TypeConverterallowNull in class TypeConverterSupportpublic <T> T convertTo(Class<T> type, Exchange exchange, Object value)
TypeConvertertype - the requested typeexchange - the current exchangevalue - the value to be convertedApache Camel