Class CompilerFactoryFactory


  • public final class CompilerFactoryFactory
    extends java.lang.Object
    Utility class that finds implementations of ICompilerFactorys.
    • Field Detail

      • defaultCompilerFactory

        private static ICompilerFactory defaultCompilerFactory
    • Constructor Detail

      • CompilerFactoryFactory

        private CompilerFactoryFactory()
    • Method Detail

      • getDefaultCompilerFactory

        public static ICompilerFactory getDefaultCompilerFactory()
                                                          throws java.lang.Exception
        Finds the first implementation of org.codehaus.commons.compiler on the class path, then loads and instantiates its ICompilerFactory.
        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 of org.codehaus.commons.compiler on the class path, then loads and instantiates their ICompilerFactorys.
        Returns:
        The ICompilerFactorys 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 an ICompilerFactory by class name.
        Parameters:
        compilerFactoryClassName - Name of a class that implements ICompilerFactory
        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