Package org.marc4j.util
Class CharacterConverterLoader
- java.lang.Object
-
- org.marc4j.util.CharacterConverterLoader
-
public final class CharacterConverterLoader extends Object
Loads a character converter using a system property.
- Author:
- Bas Peters
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
createCharacterConverter(String label, String defaultClass)
Returns a new instance for the class defined by the given system property, or default class.
-
-
-
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 propertydefaultClass
- the default class to use if the system property is null- Throws:
CharacterConverterLoaderException
- is thrown if an error occurs
-
-