Class MiscConverters.StringToEnumConverterCreator<E extends Enum<E>>

java.lang.Object
org.apache.ofbiz.base.conversion.MiscConverters.StringToEnumConverterCreator<E>
All Implemented Interfaces:
ConverterCreator, ConverterLoader
Enclosing class:
MiscConverters

public static class MiscConverters.StringToEnumConverterCreator<E extends Enum<E>> extends Object implements ConverterCreator, ConverterLoader
  • Constructor Details

    • StringToEnumConverterCreator

      public StringToEnumConverterCreator()
  • Method Details

    • loadConverters

      public void loadConverters()
      Description copied from interface: ConverterLoader
      Create and register converters with the Java object type conversion framework. If the converter extends one of the converter abstract classes, then the converter will register itself when an instance is created. Otherwise, call Converters.registerConverter(Converter) with the Converter instance.
      Specified by:
      loadConverters in interface ConverterLoader
    • createConverter

      public <S, T> Converter<S,T> createConverter(Class<S> sourceClass, Class<T> targetClass)
      Description copied from interface: ConverterCreator
      Creates a Converter that can convert the sourceClass to the targetClass. Returns null if this creater doesn't support the class pair.
      Specified by:
      createConverter in interface ConverterCreator
      Parameters:
      sourceClass - The source Class to convert
      targetClass - The target Class to convert to
      Returns:
      a converter that can convert Objects