public final class CompilerFactoryFactory extends Object
ICompilerFactory
s.Modifier and Type | Method and Description |
---|---|
static ICompilerFactory[] |
getAllCompilerFactories()
Deprecated.
Use
getAllCompilerFactories(ClassLoader) instead |
static ICompilerFactory[] |
getAllCompilerFactories(ClassLoader classLoader)
Finds all implementation of
org.codehaus.commons.compiler through the classLoader, then loads
and instantiates the implementations' ICompilerFactory s. |
static ICompilerFactory |
getCompilerFactory(String compilerFactoryClassName)
Deprecated.
|
static ICompilerFactory |
getCompilerFactory(String compilerFactoryClassName,
ClassLoader classLoader)
Loads an
ICompilerFactory implementation by class name. |
static ICompilerFactory |
getDefaultCompilerFactory()
Deprecated.
Use
getDefaultCompilerFactory(ClassLoader) instead |
static ICompilerFactory |
getDefaultCompilerFactory(ClassLoader classLoader)
Finds the first implementation of
org.codehaus.commons.compiler through the classLoader, then
loads and instantiates the implementation's ICompilerFactory . |
static String |
getSpecificationVersion() |
@Deprecated public static ICompilerFactory getDefaultCompilerFactory() throws Exception
getDefaultCompilerFactory(ClassLoader)
insteadgetDefaultCompilerFactory(Thread.currentThread().getContextClassLoader())
.
The context class loader is typically a bad choice, because frameworks use (abuse?) the context class loader
for different purposes, which causes problems in individual contexts.public static ICompilerFactory getDefaultCompilerFactory(ClassLoader classLoader) throws Exception
org.codehaus.commons.compiler
through the classLoader, then
loads and instantiates the implementation's ICompilerFactory
.
If the implementation is on the application class path (which is the case for probably 99% of all
environments), then the correct class loader to use would be ClassLoader.getSystemClassLoader()
.
ICompilerFactory
of the first implementation that was loadedException
- Many things can go wrong while finding and initializing the default compiler factory@Deprecated public static ICompilerFactory[] getAllCompilerFactories() throws Exception
getAllCompilerFactories(ClassLoader)
insteadgetAllCompilerFactories(Thread.currentThread().getContextClassLoader())
.
The context class loader is typically a bad choice, because frameworks use (abuse?) the context class loader
for different purposes, which causes problems in individual contexts.public static ICompilerFactory[] getAllCompilerFactories(ClassLoader classLoader) throws Exception
org.codehaus.commons.compiler
through the classLoader, then loads
and instantiates the implementations' ICompilerFactory
s.
If the implementations are on the application class path (which is the case for probably 99% of all
environments), then the correct class loader to use would be ClassLoader.getSystemClassLoader()
.
ICompilerFactory
s of all implementations that were loadedException
- Many things can go wrong while finding and initializing the default compiler factory@Deprecated public static ICompilerFactory getCompilerFactory(String compilerFactoryClassName) throws Exception
getCompilerFactory(Thread.currentThread().getContextClassLoader())
.
If the implementation is on the application class path (which is the case for probably 99% of all
environments), then the correct class loader to use would be ClassLoader.getSystemClassLoader()
.
compilerFactoryClassName
- Name of a class that implements ICompilerFactory
Exception
- Many things can go wrong while finding and initializing the default compiler
factorypublic static ICompilerFactory getCompilerFactory(String compilerFactoryClassName, ClassLoader classLoader) throws Exception
ICompilerFactory
implementation by class name.
If the implementation is on the application class path (which is the case for probably 99% of all
environments), then the correct class loader to use would be ClassLoader.getSystemClassLoader()
.
compilerFactoryClassName
- Name of a class that implements ICompilerFactory
Exception
- Many things can go wrong while loading and initializing the default compiler
factorypublic static String getSpecificationVersion()
null
Copyright © 2021. All rights reserved.