org.apache.camel.spi
Interface TypeConverterRegistry

All Known Implementing Classes:
BaseTypeConverterRegistry, DefaultTypeConverter, LazyLoadingTypeConverter, OsgiTypeConverter, ReportingTypeConverterRegistry

public interface TypeConverterRegistry

Registry for type converters.

Version:
$Revision: 19138 $

Method Summary
 void addFallbackTypeConverter(TypeConverter typeConverter, boolean canPromote)
          Registers a new fallback type converter
 void addTypeConverter(Class<?> toType, Class<?> fromType, TypeConverter typeConverter)
          Registers a new type converter
 Injector getInjector()
          Gets the injector
 TypeConverter lookup(Class<?> toType, Class<?> fromType)
          Performs a lookup for a given type converter.
 void setInjector(Injector injector)
          Sets the injector to be used for creating new instances during type convertions.
 

Method Detail

addTypeConverter

void addTypeConverter(Class<?> toType,
                      Class<?> fromType,
                      TypeConverter typeConverter)
Registers a new type converter

Parameters:
toType - the type to convert to
fromType - the type to convert from
typeConverter - the type converter to use

addFallbackTypeConverter

void addFallbackTypeConverter(TypeConverter typeConverter,
                              boolean canPromote)
Registers a new fallback type converter

Parameters:
typeConverter - the type converter to use
canPromote - whether or not the fallback type converter can be promoted to a first class type converter

lookup

TypeConverter lookup(Class<?> toType,
                     Class<?> fromType)
Performs a lookup for a given type converter.

Parameters:
toType - the type to convert to
fromType - the type to convert from
Returns:
the type converter or null if not found.

setInjector

void setInjector(Injector injector)
Sets the injector to be used for creating new instances during type convertions.

Parameters:
injector - the injector

getInjector

Injector getInjector()
Gets the injector

Returns:
the injector


Apache CAMEL