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.

Version:
$Revision: 1.2 $
Author:
Bas Peters

Method Summary
static Object createCharacterConverter(String label, String defaultClass)
          Returns a new instance for the class defined by the given system property, or default class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


Copyright 2001-2003 Bas Peters. All Rights Reserved.