Class CompilerAdapterFactory
java.lang.Object
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory
Creates the necessary compiler adapter, given basic criteria.
- Since:
- Ant 1.3
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String
- 
Method SummaryModifier and TypeMethodDescriptionstatic 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.static booleanisClassicJdkCompiler(String compilerName) Does the compiler correspond to "classic"?static booleanisForkedJavac(String compilerName) Is the compiler implementation a forked jdk compiler?static booleanisJdkCompiler(String compilerName) Is the compiler implementation a jdk compiler?static booleanisJdkCompilerNickname(String compilerName) Is the compiler implementation a jdk compiler without specified version?static booleanisModernJdkCompiler(String compilerName) Does the compiler correspond to "modern"?
- 
Field Details- 
COMPILER_JIKES- See Also:
 
- 
COMPILER_GCJ- See Also:
 
- 
COMPILER_SYMANTEC_ALIAS- See Also:
 
- 
COMPILER_SYMANTEC- See Also:
 
- 
COMPILER_JVC_ALIAS- See Also:
 
- 
COMPILER_JVC- See Also:
 
- 
COMPILER_KJC- See Also:
 
- 
COMPILER_JAVAC_1_1- See Also:
 
- 
COMPILER_JAVAC_1_2- See Also:
 
- 
COMPILER_JAVAC_1_3- See Also:
 
- 
COMPILER_JAVAC_1_4- See Also:
 
- 
COMPILER_JAVAC_1_5- See Also:
 
- 
COMPILER_JAVAC_1_6- See Also:
 
- 
COMPILER_JAVAC_1_7- See Also:
 
- 
COMPILER_JAVAC_1_8- See Also:
 
- 
COMPILER_JAVAC_9_ALIAS- See Also:
 
- 
COMPILER_JAVAC_9- See Also:
 
- 
COMPILER_JAVAC_10_PLUS- See Also:
 
- 
COMPILER_CLASSIC- See Also:
 
- 
COMPILER_MODERN- See Also:
 
- 
COMPILER_EXTJAVAC- See Also:
 
- 
COMPILER_MODERN_CLASSNAME
- 
COMPILER_EXTJAVAC_CLASSNAME
 
- 
- 
Method Details- 
getCompilerBased on the parameter passed in, this method creates the necessary factory desired. The current mapping for compiler names are as follows:- jikes = jikes compiler
- classic, javac1.1, javac1.2 = the standard compiler from JDK 1.1/1.2
- modern, javac1.3, javac1.4, javac1.5 = the compiler of JDK 1.3+
- jvc, microsoft = the command line compiler from Microsoft's SDK for Java / Visual J++
- kjc = the kopi compiler
- gcj = the gcj compiler from gcc
- sj, symantec = the Symantec Java compiler
- a fully qualified classname = the name of a compiler adapter
 - 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.
 
- 
getCompilerpublic static CompilerAdapter getCompiler(String compilerType, Task task, Path classpath) throws BuildException Based on the parameter passed in, this method creates the necessary factory desired. The current mapping for compiler names are as follows:- jikes = jikes compiler
- classic, javac1.1, javac1.2 = the standard compiler from JDK 1.1/1.2
- modern, javac1.3, javac1.4, javac1.5 = the compiler of JDK 1.3+
- jvc, microsoft = the command line compiler from Microsoft's SDK for Java / Visual J++
- kjc = the kopi compiler
- gcj = the gcj compiler from gcc
- sj, symantec = the Symantec Java compiler
- a fully qualified classname = the name of a compiler adapter
 - 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
 
- 
isForkedJavacIs the compiler implementation a forked jdk compiler?- Parameters:
- compilerImpl- the name of the compiler implementation
- Since:
- 1.10.12
 
- 
isJdkCompilerIs the compiler implementation a jdk compiler?- Parameters:
- compilerImpl- the name of the compiler implementation
- Since:
- 1.10.12
 
- 
isJdkCompilerNicknameIs the compiler implementation a jdk compiler without specified version?- Parameters:
- compilerImpl- the name of the compiler implementation
- Since:
- 1.10.12
 
- 
isClassicJdkCompilerDoes the compiler correspond to "classic"?- Parameters:
- compilerImpl- the name of the compiler implementation
- Since:
- 1.10.12
 
- 
isModernJdkCompilerDoes the compiler correspond to "modern"?- Parameters:
- compilerImpl- the name of the compiler implementation
- Since:
- 1.10.12
 
 
-