public class EclipseCompiler extends Object
Failure API
. Unless a target directory is set through
intoFolder(Path)
, this compiler produces no class file output.Constructor and Description |
---|
EclipseCompiler(Path sourceFolder)
Creates a compiler that will compile all java files in the provided
sourceFolder . |
Modifier and Type | Method and Description |
---|---|
void |
compile()
Executes the compilation.
|
EclipseCompiler |
intoFolder(Path compilationTargetFolder)
Set’s the compilations output folder to the provided
targetFolder . |
EclipseCompiler |
useCharset(Charset ioCharset)
Makes the compiler use
charset to read the source source code. |
EclipseCompiler |
useClassPath(String compiltationClassPathSegment)
Provides a classpath segment to be used by the compiler.
|
public EclipseCompiler(Path sourceFolder)
sourceFolder
.sourceFolder
- The folder containing the files to compile. Must not be
null
.public EclipseCompiler useClassPath(String compiltationClassPathSegment)
compiltationClassPathSegment
- A classpath segment the compiler should use to
compile.this
.public EclipseCompiler intoFolder(Path compilationTargetFolder)
targetFolder
. The
compiler will not generate output files unless a target folder is set through this
method.compilationTargetFolder
- The folder into which the compiled byte code is to
be stored.this
.public EclipseCompiler useCharset(Charset ioCharset)
charset
to read the source source code. It defaults
to using the compiler’s default charset if no charset was set.ioCharset
- The charset to be used by this compiler.this
.public void compile()