Class TranscoderFactory

java.lang.Object
org.ldaptive.beans.reflect.TranscoderFactory

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

  • Constructor Details

    • TranscoderFactory

      private TranscoderFactory()
      Default constructor.
  • Method Details

    • 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

      protected 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