Class CharacterConverterLoader


  • public final class CharacterConverterLoader
    extends Object

    Loads a character converter using a system property.

    Author:
    Bas Peters
    • Method Detail

      • createCharacterConverter

        public static Object createCharacterConverter​(String label,
                                                      String defaultClass)
                                               throws CharacterConverterLoaderException

        Returns a new instance for the class defined by the given system property, or default class.

        The method will first look for a system property, then for a properties file named marc4j.properties. If these options fail, an instance of the default class is returned.

        Parameters:
        label - the label for the system property
        defaultClass - the default class to use if the system property is null
        Throws:
        CharacterConverterLoaderException - is thrown if an error occurs