Package org.codehaus.commons.compiler
Class CompilerFactoryFactory
- java.lang.Object
-
- org.codehaus.commons.compiler.CompilerFactoryFactory
-
public final class CompilerFactoryFactory extends java.lang.Object
Utility class that finds implementations ofICompilerFactory
s.
-
-
Field Summary
Fields Modifier and Type Field Description private static ICompilerFactory
defaultCompilerFactory
-
Constructor Summary
Constructors Modifier Constructor Description private
CompilerFactoryFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ICompilerFactory[]
getAllCompilerFactories()
Finds all implementation oforg.codehaus.commons.compiler
on the class path, then loads and instantiates theirICompilerFactory
s.static ICompilerFactory
getCompilerFactory(java.lang.String compilerFactoryClassName)
Loads anICompilerFactory
by class name.static ICompilerFactory
getDefaultCompilerFactory()
Finds the first implementation oforg.codehaus.commons.compiler
on the class path, then loads and instantiates itsICompilerFactory
.static java.lang.String
getSpecificationVersion()
-
-
-
Field Detail
-
defaultCompilerFactory
private static ICompilerFactory defaultCompilerFactory
-
-
Method Detail
-
getDefaultCompilerFactory
public static ICompilerFactory getDefaultCompilerFactory() throws java.lang.Exception
Finds the first implementation oforg.codehaus.commons.compiler
on the class path, then loads and instantiates itsICompilerFactory
.- Returns:
- The
ICompilerFactory
of the first implementation on the class path - Throws:
java.lang.Exception
- Many things can go wrong while finding and initializing the default compiler factory
-
getAllCompilerFactories
public static ICompilerFactory[] getAllCompilerFactories() throws java.lang.Exception
Finds all implementation oforg.codehaus.commons.compiler
on the class path, then loads and instantiates theirICompilerFactory
s.- Returns:
- The
ICompilerFactory
s of all implementations on the class path - Throws:
java.lang.Exception
- Many things can go wrong while finding and initializing compiler factories
-
getCompilerFactory
public static ICompilerFactory getCompilerFactory(java.lang.String compilerFactoryClassName) throws java.lang.Exception
Loads anICompilerFactory
by class name.- Parameters:
compilerFactoryClassName
- Name of a class that implementsICompilerFactory
- Throws:
java.lang.Exception
- Many things can go wrong while loading and initializing the default compiler factory
-
getSpecificationVersion
public static java.lang.String getSpecificationVersion()
- Returns:
- The version of the commons-compiler specification, or
null
-
-