barcode4j 2.1.0

org.krysalis.barcode4j
Class DefaultBarcodeClassResolver

java.lang.Object
  extended by org.krysalis.barcode4j.DefaultBarcodeClassResolver
All Implemented Interfaces:
BarcodeClassResolver

public class DefaultBarcodeClassResolver
extends java.lang.Object
implements BarcodeClassResolver

This is a simple implementation of a BarcodeClassResolver.

Version:
$Id: DefaultBarcodeClassResolver.java,v 1.14 2012/01/27 14:36:35 jmaerki Exp $

Constructor Summary
DefaultBarcodeClassResolver()
          Main constructor.
 
Method Summary
 java.util.Collection getBarcodeNames()
          Return the names of all registered barcode types.
 void registerBarcodeClass(java.lang.String id, java.lang.String classname)
          Registers a barcode implementation.
 void registerBarcodeClass(java.lang.String id, java.lang.String classname, boolean mainID)
          Registers a barcode implementation.
 java.lang.Class resolve(java.lang.String name)
          Returns the Class object of a Barcode implementation.
 java.lang.Class resolveBean(java.lang.String name)
          Returns the Class object of a Barcode bean implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBarcodeClassResolver

public DefaultBarcodeClassResolver()
Main constructor.
Already registers a default set of implementations.

Method Detail

registerBarcodeClass

public void registerBarcodeClass(java.lang.String id,
                                 java.lang.String classname)
Registers a barcode implementation.

Parameters:
id - short name to use as a key
classname - fully qualified classname

registerBarcodeClass

public void registerBarcodeClass(java.lang.String id,
                                 java.lang.String classname,
                                 boolean mainID)
Registers a barcode implementation.

Parameters:
id - short name to use as a key
classname - fully qualified classname
mainID - indicates whether the name is the main name for the barcode

resolve

public java.lang.Class resolve(java.lang.String name)
                        throws java.lang.ClassNotFoundException
Description copied from interface: BarcodeClassResolver
Returns the Class object of a Barcode implementation.

Specified by:
resolve in interface BarcodeClassResolver
Parameters:
name - Name or Classname of a Barcode implementation class
Returns:
Class The class requested
Throws:
java.lang.ClassNotFoundException - If the class could not be resolved
See Also:
BarcodeClassResolver.resolve(String)

resolveBean

public java.lang.Class resolveBean(java.lang.String name)
                            throws java.lang.ClassNotFoundException
Description copied from interface: BarcodeClassResolver
Returns the Class object of a Barcode bean implementation.

Specified by:
resolveBean in interface BarcodeClassResolver
Parameters:
name - Name or Classname of a Barcode bean implementation class
Returns:
Class The class requested
Throws:
java.lang.ClassNotFoundException - If the class could not be resolved
See Also:
BarcodeClassResolver.resolveBean(String)

getBarcodeNames

public java.util.Collection getBarcodeNames()
Description copied from interface: BarcodeClassResolver
Return the names of all registered barcode types.

Specified by:
getBarcodeNames in interface BarcodeClassResolver
Returns:
the names as a Collection of java.lang.String instances.
See Also:
BarcodeClassResolver.getBarcodeNames()

barcode4j 2.1.0

Copyright © 2000-2010 Jeremias Maerki. All rights reserved.