Module io.github.ascopes.jct
Package io.github.ascopes.jct.compilers
Interface JctCompilationFactory
Factory for producing
JctCompilation objects by performing a physical compilation with a
compiler.- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Method Summary
Modifier and TypeMethodDescriptioncreateCompilation(List<String> flags, JctFileManager fileManager, JavaCompiler jsr199Compiler, @Nullable Collection<String> classNames) Create a compilation.
-
Method Details
-
createCompilation
JctCompilation createCompilation(List<String> flags, JctFileManager fileManager, JavaCompiler jsr199Compiler, @Nullable Collection<String> classNames) Create a compilation.- Parameters:
flags- the flags to pass to the compiler.fileManager- the file manager to use for file management.jsr199Compiler- the compiler backend to use.classNames- the binary names of the classes to compile. If this isnull, then classes should be discovered automatically.- Returns:
- the compilation result that contains whether the compiler succeeded or failed, amongst other information.
- Throws:
JctCompilerException- if any prerequisites fail, such as no compilation units being found, or if the underlying JSR-199 compiler raises an unhandled exception and cannot complete when invoked.NullPointerException- if any inputs are unexpectedly set tonull.
-