io.sarl.lang.compiler.batch
Class AbstractJavaBatchCompiler
All Superinterfaces:
IJavaBatchCompiler
All Known Subclasses:
EcjBatchCompiler, JavacBatchCompiler
abstract class AbstractJavaBatchCompiler
extends java.lang.Object
implements IJavaBatchCompiler
Abstract implementation for the Java batch compilers.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
batchcompiler
Since:
0.12
Property Summary
Inherited: name
Constructor Summary
Constructor and description
new
Action Summary
Modifier and type Action and description
protected boolean addFolderIfJavaFileDeeply(List<E>,File)
Fill the given root folder to the list if a Java file is found inside, recursively.
protected boolean addJavaFilesDeeply(List<E>,File)
Fill the given list with the Java files from the given root folder, recursively.
protected static java.lang.String buildPath(Iterable<T>,IProgressMonitor)
Build a OS-dependent path from the given list of files.
final CompilerStatus compile(File,Iterable<T>,Iterable<T>,Iterable<T>,String,String,boolean,OptimizationLevel,PrintWriter,PrintWriter,Logger,IProgressMonitor)
protected abstract CompilerStatus compile(File,Iterable<T>,Iterable<T>,Iterable<T>,JavaVersion,boolean,String,boolean,OptimizationLevel,PrintWriter,PrintWriter,Logger,IProgressMonitor)
Run the Java compiler.
protected boolean isJavaExtension(File)
Replies if the given file is a JAva source file, i.e. with .java file extension.
Inherited: getName
Constructor Details
new
new
Action Details
addFolderIfJavaFileDeeply(List<E>,File)
protected def addFolderIfJavaFileDeeply(List<E>,File) : boolean
Fill the given root folder to the list if a Java file is found inside, recursively.
Parameters:
list - the list to fill out.
root - the root folder to explore.
Returns:
true if a file was added into the list .
Since:
0.12
See:
addJavaFilesDeeply(List<E>,File)
addJavaFilesDeeply(List<E>,File)
protected def addJavaFilesDeeply(List<E>,File) : boolean
Fill the given list with the Java files from the given root folder, recursively.
Parameters:
list - the list to fill out.
root - the root folder to explore.
Returns:
true if a file was added into the list .
See:
addFolderIfJavaFileDeeply(List<E>,File)
buildPath(Iterable<T>,IProgressMonitor)
protected def buildPath(Iterable<T>,IProgressMonitor) : java.lang.String
Build a OS-dependent path from the given list of files.
Parameters:
path - the list of files.
progress - the progress indicator.
Returns:
the OS-dependent path.
compile(File,Iterable<T>,Iterable<T>,Iterable<T>,String,String,boolean,OptimizationLevel,PrintWriter,PrintWriter,Logger,IProgressMonitor)
def compile(File,Iterable<T>,Iterable<T>,Iterable<T>,String,String,boolean,OptimizationLevel,PrintWriter,PrintWriter,Logger,IProgressMonitor) : CompilerStatus
compile(File,Iterable<T>,Iterable<T>,Iterable<T>,JavaVersion,boolean,String,boolean,OptimizationLevel,PrintWriter,PrintWriter,Logger,IProgressMonitor)
protected def compile(File,Iterable<T>,Iterable<T>,Iterable<T>,JavaVersion,boolean,String,boolean,OptimizationLevel,PrintWriter,PrintWriter,Logger,IProgressMonitor) : CompilerStatus
Run the Java compiler.
Parameters:
classDirectory - the output directory.
sourcePathDirectories - the source directories.
classPathEntries - classpath entries.
modulePathEntries - classpath entries. No more used.
javaVersion - the version of Java that is the target, e.g. 11.
isModuleSupport - indicates if modules are supported.
encoding - the encoding of the files.
isCompilerMoreVerbose - indicates if the Java compiler should be more verbose.
optimizationLevel - the level of optimization to apply to the byte code or null if the defaults must be applied.
outWriter - the standard output writer.
errWriter - the standard error writer.
logger - the logger to use for debugging messages.
progress - monitor of the progress of the compilation.
Returns:
the success status; Never null .
isJavaExtension(File)
protected def isJavaExtension(File) : boolean
Replies if the given file is a JAva source file, i.e. with .java file extension.
Parameters:
file - the file to test.
Returns:
true if the file is considered as a Java file.