Package com.bc.ceres.binding
Class ConverterRegistry
java.lang.Object
com.bc.ceres.binding.ConverterRegistry
A registry for
Converters.- Since:
- 0.6
-
Method Summary
Modifier and TypeMethodDescription<T> Converter<T> getConverter(Class<? extends T> type) Gets the converter registered with the given type.static ConverterRegistryGets the singleton instance of the registry.<T> voidsetConverter(Class<? extends T> type, Converter<T> converter) Sets the converter to be used for the specified type.
-
Method Details
-
getInstance
Gets the singleton instance of the registry.- Returns:
- The instance.
-
setConverter
Sets the converter to be used for the specified type.- Parameters:
type- The type.converter- The converter.
-
getConverter
Gets the converter registered with the given type.- Parameters:
type- The type.- Returns:
- The converter or
nullif no such exists.
-