Class Compiler
- java.lang.Object
-
- org.codehaus.commons.compiler.AbstractCompiler
-
- org.codehaus.commons.compiler.jdk.Compiler
-
- All Implemented Interfaces:
ICompiler
public class Compiler extends AbstractCompiler
javax.tools
-based implementation of theICompiler
.
-
-
Field Summary
-
Fields inherited from class org.codehaus.commons.compiler.AbstractCompiler
bootClassPath, classFileCreator, classFileFinder, classPath, compileErrorHandler, debugLines, debugSource, debugVars, extensionDirectories, sourceCharset, sourceFinder, sourceVersion, targetVersion, warningHandler
-
Fields inherited from interface org.codehaus.commons.compiler.ICompiler
CREATE_NEXT_TO_SOURCE_FILE, FIND_NEXT_TO_SOURCE_FILE, NO_DESTINATION_DIRECTORY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compile(Resource[] sourceResources)
void
compile(Resource[] sourceResources, java.util.SortedSet<Location> offsets)
void
setCompilerOptions(java.lang.String[] compilerOptions)
Adds command line options that are passed unchecked to theCompiler
.void
setVerbose(boolean verbose)
Equivalent of-verbose
.-
Methods inherited from class org.codehaus.commons.compiler.AbstractCompiler
compile, setBootClassPath, setCharacterEncoding, setClassFileCreator, setClassFileFinder, setClassFileFinder, setClassPath, setCompileErrorHandler, setDebugLines, setDebugSource, setDebugVars, setDestinationDirectory, setEncoding, setExtensionDirectories, setSourceCharset, setSourceFinder, setSourcePath, setSourceVersion, setTargetVersion, setWarningHandler
-
-
-
-
Method Detail
-
setVerbose
public void setVerbose(boolean verbose)
Description copied from interface:ICompiler
Equivalent of-verbose
.
-
setCompilerOptions
public void setCompilerOptions(java.lang.String[] compilerOptions)
Adds command line options that are passed unchecked to theCompiler
.Notice: Don't use the '-g' options - these are controlled through
AbstractCompiler.setDebugLines(boolean)
,AbstractCompiler.setDebugVars(boolean)
andAbstractCompiler.setDebugSource(boolean)
.- Parameters:
compilerOptions
- All command line options supported by the JDK JAVAC tool
-
compile
public void compile(Resource[] sourceResources) throws CompileException, java.io.IOException
Description copied from interface:ICompiler
- Parameters:
sourceResources
- Contain the compilation units to compile- Throws:
CompileException
java.io.IOException
-
compile
public void compile(Resource[] sourceResources, @Nullable java.util.SortedSet<Location> offsets) throws CompileException, java.io.IOException
- Throws:
CompileException
java.io.IOException
-
-