Package com.bc.ceres.binding
Class ConverterRegistry
java.lang.Object
com.bc.ceres.binding.ConverterRegistry
A registry for
Converter
s.- 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 ConverterRegistry
Gets the singleton instance of the registry.<T> void
setConverter
(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
null
if no such exists.
-