org.freehep.util
Class Factory
- java.lang.Object
-
- org.freehep.util.Factory
-
public class Factory extends java.lang.ObjectMethods to use factories (a la JAXP).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.lang.StringfindFactory(java.lang.String factoryName, java.lang.String factoryFile, java.lang.String defaultFactory)Find the correct factory name, based on the following procedure: Use the specified system property: factoryName.static java.lang.ObjectloadFactory(java.lang.String name, java.lang.String file, java.lang.String defaultImplementation)
-
-
-
Method Detail
-
findFactory
public static java.lang.String findFactory(java.lang.String factoryName, java.lang.String factoryFile, java.lang.String defaultFactory)Find the correct factory name, based on the following procedure:- Use the specified system property: factoryName.
- Use the specified property file in JAVA_HOME/lib/
and the specified property: factoryName. - Use the Services API (as detailed in the JAR specification) to look for the classname in META-INF/services/
. - Use the specfied default factory: defaultFactory.
- Use the Services API (as detailed in the JAR specification) to look for the classname in META-INF/services/
- Parameters:
factoryName- name to be used for lookupfactoryFile- filename to look for in JAVA_HOME/libdefaultFactory- name of the default factory- Returns:
- the name of the factory according to the procedure above
-
loadFactory
public static java.lang.Object loadFactory(java.lang.String name, java.lang.String file, java.lang.String defaultImplementation)
-
-
DMelt 3.0 © DataMelt by jWork.ORG