Class ConverterRegistry


  • public class ConverterRegistry
    extends Object
    A registry for Converters.
    Since:
    0.6
    • Method Detail

      • getInstance

        public static ConverterRegistry getInstance()
        Gets the singleton instance of the registry.
        Returns:
        The instance.
      • setConverter

        public <T> void setConverter​(Class<? extends T> type,
                                     Converter<T> converter)
        Sets the converter to be used for the specified type.
        Parameters:
        type - The type.
        converter - The converter.
      • getConverter

        public <T> Converter<T> getConverter​(Class<? extends T> type)
        Gets the converter registered with the given type.
        Parameters:
        type - The type.
        Returns:
        The converter or null if no such exists.