| Modifier and Type | Field and Description |
|---|---|
| public static final ResourceCreator | CREATE_NEXT_TO_SOURCE_FILE
Special value for |
| public static final ResourceFinder | FIND_NEXT_TO_SOURCE_FILE
Special value for |
| public static final File | NO_DESTINATION_DIRECTORY
Special value for |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true for backwards compatibility (return value can safely be ignored)Contain the compilation units to compile sourceFiles)Reads a set of Java compilation units (a.k.a. "source files") from the file system, compiles them into a set of "class files" and stores these in the file system. |
| public void | |
| public void | |
| public void | |
| public void | setClassFileCreator(ResourceCreator
Special value classFileCreator)CREATE_NEXT_TO_SOURCE_FILE means "create .class file
next to its source file, not in the destination directory"This |
| public void | setClassFileFinder(ResourceFinder classFileFinder, boolean rebuild)
Equivalent with |
| public void | setClassFileFinder(ResourceFinder
Special value classFileFinder)FIND_NEXT_TO_SOURCE_FILE means ".class file is next to
its source file, not in the destination directory"This |
| public void | |
| public void | setCompileErrorHandler(ErrorHandler
null to restore the default behavior (throwing a CompileException)Installs an |
| public void | |
| public void | |
| public void | |
| public void | setDestinationDirectory(File
NO_DESTINATION_DIRECTORY means "create .class resources in
the directory of the .java resource from which they are generated"Equivalent of
-d and |
| public void | |
| public void | |
| public void | |
| public void | setSourceFinder(ResourceFinder sourceFinder)
Finds more |
| public void | |
| public void | setSourceVersion(int version)
Specifies the version of source code accepted, in analogy with JAVAC's |
| public void | setTargetVersion(int version)
Generates class files that target a specified release of the virtual machine, in analogy with JAVAC's |
| public void | |
| public void | setWarningHandler(WarningHandler
null to indicate that no warnings be issuedBy default, warnings are discarded, but an application my install a custom |
| CREATE_NEXT_TO_SOURCE_FILE | back to summary |
|---|---|
| public static final ResourceCreator CREATE_NEXT_TO_SOURCE_FILE Special value for | |
| FIND_NEXT_TO_SOURCE_FILE | back to summary |
|---|---|
| public static final ResourceFinder FIND_NEXT_TO_SOURCE_FILE Special value for
| |
| NO_DESTINATION_DIRECTORY | back to summary |
|---|---|
| public static final File NO_DESTINATION_DIRECTORY Special value for | |
| compile | back to summary |
|---|---|
| public boolean compile(File[] sourceFiles) throws CompileException, IOException Reads a set of Java compilation units (a.k.a. "source files") from the file system, compiles them into a set of "class files" and stores these in the file system. Additional source files are parsed and compiled on demand through the "source path" set of directories. For example, if the source path comprises the directories "A/B" and "../C", then the source file for class "com.acme.Main" is searched in
Notice that it does make a difference whether you pass multiple source files to This method must be called exactly once after object construction.
Compile errors are reported as described at
| |
| compile | back to summary |
|---|---|
| public void compile(Resource[] sourceResources) throws CompileException, IOException See
| |
| setBootClassPath | back to summary |
|---|---|
| public void setBootClassPath(File[] directoriesAndArchives) Equivalent of
| |
| setCharacterEncoding | back to summary |
|---|---|
| public void setCharacterEncoding(String characterEncoding)
Deprecated Use
| |
| setClassFileCreator | back to summary |
|---|---|
| public void setClassFileCreator(ResourceCreator classFileCreator) This
The default is, as for JAVAC,
| |
| setClassFileFinder | back to summary |
|---|---|
| public void setClassFileFinder(ResourceFinder classFileFinder, boolean rebuild) Equivalent with | |
| setClassFileFinder | back to summary |
|---|---|
| public void setClassFileFinder(ResourceFinder classFileFinder) This
If it is impossible to check whether an already-compiled class file exists, or if you want to enforce
recompilation, pass
The default is, as for JAVAC,
| |
| setClassPath | back to summary |
|---|---|
| public void setClassPath(File[] directoriesAndArchives) Equivalent of --class-path. | |
| setCompileErrorHandler | back to summary |
|---|---|
| public void setCompileErrorHandler(ErrorHandler errorHandler) Installs an
If the given
If the given
In other words: The
| |
| setDebugLines | back to summary |
|---|---|
| public void setDebugLines(boolean value) Equivalent of | |
| setDebugSource | back to summary |
|---|---|
| public void setDebugSource(boolean value) Equivalent of | |
| setDebugVars | back to summary |
|---|---|
| public void setDebugVars(boolean value) Equivalent of | |
| setDestinationDirectory | back to summary |
|---|---|
| public void setDestinationDirectory(File destinationDirectory, boolean rebuild) Equivalent of
-d and
Overrides any previously configured
| |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(Charset encoding) The equivalent of JAVA's "
| |
| setExtensionDirectories | back to summary |
|---|---|
| public void setExtensionDirectories(File[] directories) Equivalent of | |
| setSourceCharset | back to summary |
|---|---|
| public void setSourceCharset(Charset charset) Same as | |
| setSourceFinder | back to summary |
|---|---|
| public void setSourceFinder(ResourceFinder sourceFinder) Finds more | |
| setSourcePath | back to summary |
|---|---|
| public void setSourcePath(File[] directoriesAndArchives) Equivalent of
Equivalent with | |
| setSourceVersion | back to summary |
|---|---|
| public void setSourceVersion(int version) Specifies the version of source code accepted, in analogy with JAVAC's | |
| setTargetVersion | back to summary |
|---|---|
| public void setTargetVersion(int version) Generates class files that target a specified release of the virtual machine, in analogy with JAVAC's | |
| setVerbose | back to summary |
|---|---|
| public void setVerbose(boolean verbose) Equivalent of | |
| setWarningHandler | back to summary |
|---|---|
| public void setWarningHandler(WarningHandler warningHandler) By default, warnings are discarded, but an application my install a custom
| |