FreeHEP API
Version current

org.freehep.util
Class Factory

java.lang.Object
  extended byorg.freehep.util.Factory

public class Factory
extends Object

Methods to use factories (a la JAXP).

Version:
$Id: Factory.java,v 1.6 2004/01/19 21:23:58 duns Exp $
Author:
Mark Donszelmann
Source Code:
Factory.java

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
defaultFactory - name of the default factory
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 current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.