public class OptimisedTypeConverter extends Object
InstanceMethodTypeConverter
or StaticMethodTypeConverter
.
In addition the performance is faster because the type converter is not looked up
via a key in the type converter Map
; which requires creating a new object
as they key and perform the map lookup. The caveat is that for any new type converter
to be included it must be manually added by adding the nessasary source code to the
optimised classes such as ObjectConverterOptimised
.Constructor and Description |
---|
OptimisedTypeConverter() |
Modifier and Type | Method and Description |
---|---|
Object |
convertTo(Class<?> type,
Exchange exchange,
Object value)
Attempts to convert the value to the given type
|
public OptimisedTypeConverter()
public Object convertTo(Class<?> type, Exchange exchange, Object value) throws Exception
type
- the type to convert toexchange
- the exchange, may be nullvalue
- the valueException
Apache Camel