org.apache.tools.ant.taskdefs.compilers

Class CompilerAdapterFactory

public final class CompilerAdapterFactory extends Object

Creates the necessary compiler adapter, given basic criteria.

Since: Ant 1.3

Method Summary
static CompilerAdaptergetCompiler(String compilerType, Task task)
Based on the parameter passed in, this method creates the necessary factory desired.
static CompilerAdaptergetCompiler(String compilerType, Task task, Path classpath)
Based on the parameter passed in, this method creates the necessary factory desired.

Method Detail

getCompiler

public static CompilerAdapter getCompiler(String compilerType, Task task)
Based on the parameter passed in, this method creates the necessary factory desired. The current mapping for compiler names are as follows:

Parameters: compilerType either the name of the desired compiler, or the full classname of the compiler's adapter. task a task to log through.

Returns: the compiler adapter

Throws: BuildException if the compiler type could not be resolved into a compiler adapter.

getCompiler

public static CompilerAdapter getCompiler(String compilerType, Task task, Path classpath)
Based on the parameter passed in, this method creates the necessary factory desired. The current mapping for compiler names are as follows:

Parameters: compilerType either the name of the desired compiler, or the full classname of the compiler's adapter. task a task to log through. classpath the classpath to use when looking up an adapter class

Returns: the compiler adapter

Throws: BuildException if the compiler type could not be resolved into a compiler adapter.

Since: Ant 1.8.0