Class TranscoderFactory


  • public final class TranscoderFactory
    extends Object
    Creates value transcoders and stores them in a static map.
    • Constructor Detail

      • TranscoderFactory

        private TranscoderFactory()
        Default constructor.
    • Method Detail

      • getInstance

        public static ValueTranscoder<?> getInstance​(String type)
        Returns a value transcoder for the supplied type. If the type cannot be found it is instantiated and cached for future use.
        Parameters:
        type - of value transcoder
        Returns:
        value transcoder
      • createValueTranscoder

        private static ValueTranscoder<?> createValueTranscoder​(String type)
        Creates a value transcoder for the supplied type.
        Parameters:
        type - to create value transcoder for
        Returns:
        value transcoder
        Throws:
        IllegalArgumentException - if the supplied type cannot be instantiated