|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.components.language.programming.java.EclipseJavaCompiler
public class EclipseJavaCompiler
Eclipse Java Compiler
Constructor Summary | |
---|---|
EclipseJavaCompiler()
|
Method Summary | |
---|---|
boolean |
compile()
Compile a source file yielding a loadable program file. |
List |
getErrors()
Return the list of errors generated by this compilation |
void |
recycle()
|
void |
setClasspath(String cp)
Eclipse Java compiler ignores class path setting and uses current Java class loader |
void |
setCompilerComplianceLevel(int compilerComplianceLevel)
Set the version of the java source code to be compiled |
void |
setDestination(String destDir)
Set the name of the directory to contain the resulting object program file |
void |
setEncoding(String encoding)
Set the encoding of the input source file or null to use the
platform's default encoding |
void |
setFile(String file)
Set the name of the file containing the source program |
void |
setSource(String srcDir)
Set the name of the directory containing the source program file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EclipseJavaCompiler()
Method Detail |
---|
public void recycle()
recycle
in interface Recyclable
public void setFile(String file)
LanguageCompiler
setFile
in interface LanguageCompiler
file
- The name of the file containing the source programpublic void setSource(String srcDir)
LanguageCompiler
setSource
in interface LanguageCompiler
srcDir
- The name of the directory containing the source program filepublic void setDestination(String destDir)
LanguageCompiler
setDestination
in interface LanguageCompiler
destDir
- The name of the directory to contain the resulting object
program filepublic void setEncoding(String encoding)
LanguageCompiler
null
to use the
platform's default encoding
setEncoding
in interface LanguageCompiler
encoding
- The encoding of the input source file or null
to use the platform's default encodingpublic void setCompilerComplianceLevel(int compilerComplianceLevel)
setCompilerComplianceLevel
in interface LanguageCompiler
compilerComplianceLevel
- The version of the JVM for wich the code was written.
i.e: 130 = Java 1.3, 140 = Java 1.4 and 150 = Java 1.5public void setClasspath(String cp)
setClasspath
in interface LanguageCompiler
cp
- classpath to be ignoredpublic boolean compile() throws IOException
LanguageCompiler
compile
in interface LanguageCompiler
IOException
- If an error occurs during compilationpublic List getErrors() throws IOException
LanguageCompiler
getErrors
in interface LanguageCompiler
IOException
- If an error occurs during message collection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |