FreeHEP API
Version v1.2

org.freehep.util
Class Factory

java.lang.Object
  |
  +--org.freehep.util.Factory

public class Factory
extends Object

Methods to use factories (a la JAXP).

Version:
$Id: Factory.java,v 1.5 2002/06/12 23:15:16 duns Exp $
Author:
Mark Donszelmann

Method Summary
static String findFactory(String factoryName, String factoryFile, String defaultFactory)
          Find the correct factory name, based on the following procedure: Use the specified system property: factoryName.
static Object loadFactory(String name, String file, String defaultImplementation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findFactory

public static String findFactory(String factoryName,
                                 String factoryFile,
                                 String defaultFactory)
Find the correct factory name, based on the following procedure:
  1. Use the specified system property: factoryName.
  2. Use the specified property file in JAVA_HOME/lib/ and the specified property: factoryName.
  3. Use the Services API (as detailed in the JAR specification) to look for the classname in META-INF/services/.
  4. Use the specfied default factory: defaultFactory.

Parameters:
factoryName - name to be used for lookup
factoryFile - filename to look for in JAVA_HOME/lib
Returns:
the name of the factory according to the procedure above

loadFactory

public static Object loadFactory(String name,
                                 String file,
                                 String defaultImplementation)

FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.