Class AbstractJctCompiler<A extends AbstractJctCompiler<A>>
- Type Parameters:
A- the type of the class extending this class.
- All Implemented Interfaces:
JctCompiler<A,JctCompilation>
JctCompilationImpl as the compilation result.
Implementations should extend this class and override anything they require. In most cases, you should not need to override anything other than the constructor.
This class is not thread-safe.
If you wish to create a common set of configuration settings for instances of
this class, you should consider writing a custom JctCompilerConfigurer object to apply
the desired operations, and then apply it to instances of this class using
configure(JctCompilerConfigurer).
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Field Summary
Fields inherited from interface io.github.ascopes.jct.compilers.JctCompiler
DEFAULT_ANNOTATION_PROCESSOR_DISCOVERY, DEFAULT_COMPILATION_MODE, DEFAULT_DIAGNOSTIC_LOGGING_MODE, DEFAULT_FAIL_ON_WARNINGS, DEFAULT_FILE_MANAGER_LOGGING_MODE, DEFAULT_FIX_JVM_MODULE_PATH_MISMATCH, DEFAULT_INHERIT_CLASS_PATH, DEFAULT_INHERIT_MODULE_PATH, DEFAULT_INHERIT_PLATFORM_CLASS_PATH, DEFAULT_INHERIT_SYSTEM_MODULE_PATH, DEFAULT_LOCALE, DEFAULT_LOG_CHARSET, DEFAULT_PREVIEW_FEATURES, DEFAULT_SHOW_DEPRECATION_WARNINGS, DEFAULT_SHOW_WARNINGS, DEFAULT_VERBOSE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractJctCompiler(String defaultName) Initialize this compiler. -
Method Summary
Modifier and TypeMethodDescriptionaddAnnotationProcessorOptions(Iterable<String> annotationProcessorOptions) Add options to pass to any annotation processors.addAnnotationProcessors(Iterable<? extends Processor> annotationProcessors) Add annotation processors to invoke.addCompilerOptions(Iterable<String> compilerOptions) Add command line options to pass tojavac.annotationProcessorDiscovery(AnnotationProcessorDiscovery annotationProcessorDiscovery) Set how to perform annotation processor discovery.buildFlags(JctFlagBuilder flagBuilder) Build the list of flags from this compiler object using the flag builder.compilationMode(CompilationMode compilationMode) Set the compilation mode to use for this compiler.Invoke the compilation and return the compilation result.compile(Workspace workspace, Collection<String> classNames) Invoke the compilation and return the compilation result.configure(JctCompilerConfigurer<E> configurer) Apply a given configurer to this compiler that can throw a checked exception.diagnosticLoggingMode(LoggingMode diagnosticLoggingMode) Set how to handle diagnostic capture.failOnWarnings(boolean enabled) Set whether to enable treating warnings as errors or not.fileManagerLoggingMode(LoggingMode fileManagerLoggingMode) Set how to handle logging calls to underlying file managers.fixJvmModulePathMismatch(boolean fixJvmModulePathMismatch) Get whether we will attempt to fix modules appearing on the classpath, or non-modules appearing on the module path.Get how to perform annotation processor discovery.Get an immutable snapshot view of the current annotation processor options that are set.Get an immutable snapshot view of the current annotation processors that are explicitly set to be run, in the order that they were provided to the compiler.Get the compilation factory to use for building a compilation.Get the compilation mode that is in use.abstract Jsr199CompilerFactoryGet the JSR-199 compiler factory to use for initialising an internal compiler.Get an immutable snapshot view of the current compiler options that are set.abstract StringGet the default release to use if no release or target version is specified.Get the current diagnostic logging mode.Get the effective release to use for the actual compilation.abstract JctFileManagerFactoryGet the file manager factory to use for building a file manager during compilation.Get the current file manager logging mode.abstract JctFlagBuilderFactoryGet the flag builder factory to use for building flags.Get the output locale.Get the charset being used to write compiler logs with.getName()Get the friendly printable name of this compiler object.Get the current release version that is set, ornullif left to the compiler to decide.Get the current source version that is set, ornullif left to the compiler to decide.Get the current target version that is set, ornullif left to the compiler default.inheritClassPath(boolean inheritClassPath) Set whether the class path is inherited from the caller JVM or not.inheritModulePath(boolean inheritModulePath) Set whether the module path is inherited from the caller JVM or not.inheritPlatformClassPath(boolean inheritPlatformClassPath) Set whether the current platform class path is being inherited from the caller JVM or not.inheritSystemModulePath(boolean inheritSystemModulePath) Set whether the system module path is inherited from the caller JVM or not.booleanDetermine whether warnings are being treated as errors or not.booleanGet whether we will attempt to fix modules appearing on the classpath, or non-modules appearing on the module path.booleanGet whether the class path is inherited from the caller JVM or not.booleanGet whether the module path is inherited from the caller JVM or not.booleanGet whether the current platform class path is being inherited from the caller JVM or not.booleanGet whether the system module path is inherited from the caller JVM or not.booleanDetermine whether preview features are enabled or not.booleanDetermine whether deprecation warnings are enabled or not.booleanDetermine whether warnings are enabled or not.booleanDetermine whether verbose logging is enabled or not.Set the output locale.logCharset(Charset logCharset) Set the charset being used to write compiler logs with.protected final Amyself()Get this implementation ofAbstractJctCompiler, cast to the type parameterAbstractJctCompiler.Set the friendly name of this compiler.previewFeatures(boolean enabled) Set whether to enable preview features or not.Set the release version.showDeprecationWarnings(boolean enabled) Set whether to enable deprecation warnings or not.showWarnings(boolean enabled) Set whether to enable displaying warnings or not.Set the source version.Set the target version.final StringtoString()Deprecated.verbose(boolean enabled) Set whether to use verbose output or not.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.ascopes.jct.compilers.JctCompiler
addAnnotationProcessorOptions, addAnnotationProcessors, addCompilerOptions, compile, release, release, source, source, target, target
-
Constructor Details
-
AbstractJctCompiler
Initialize this compiler.- Parameters:
defaultName- the printable default name to use for the compiler.
-
-
Method Details
-
compile
Description copied from interface:JctCompilerInvoke the compilation and return the compilation result.The actual classes to compile will be dynamically discovered. If you wish to specify the specific classes to compile, see
JctCompiler.compile(Workspace, String, String...)orJctCompiler.compile(Workspace, Collection).- Specified by:
compilein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
workspace- the workspace to compile.- Returns:
- the compilation result.
- See Also:
-
compile
Description copied from interface:JctCompilerInvoke the compilation and return the compilation result.Only classes matching the given class names will be compiled.
If you wish to let JCT determine which classes to compile dynamically, see
JctCompiler.compile(Workspace)instead.- Specified by:
compilein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
workspace- the workspace to compile.classNames- the class names to compile.- Returns:
- the compilation result.
- See Also:
-
configure
Description copied from interface:JctCompilerApply a given configurer to this compiler that can throw a checked exception.- Specified by:
configurein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Type Parameters:
E- any exception that may be thrown.- Parameters:
configurer- the configurer to invoke.- Returns:
- this compiler object for further call chaining.
- Throws:
E- any exception that may be thrown by the configurer.
-
getName
Description copied from interface:JctCompilerGet the friendly printable name of this compiler object.- Specified by:
getNamein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the name of the compiler.
-
name
Description copied from interface:JctCompilerSet the friendly name of this compiler.- Specified by:
namein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
name- the name to set.- Returns:
- this compiler object for further call chaining.
-
isVerbose
Description copied from interface:JctCompilerDetermine whether verbose logging is enabled or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_VERBOSE.Note that enabling this is compiler-specific behaviour. There is no guarantee that the output target or the format or verbosity of output will be consistent between different compiler implementations.
- Specified by:
isVerbosein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether verbose logging is enabled or not.
-
verbose
Description copied from interface:JctCompilerSet whether to use verbose output or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_VERBOSE.Note that enabling this is compiler-specific behaviour. There is no guarantee that the output target or the format or verbosity of output will be consistent between different compiler implementations.
- Specified by:
verbosein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
enabled-truefor verbose output,falsefor normal output.- Returns:
- this compiler for further call chaining.
-
isPreviewFeatures
Description copied from interface:JctCompilerDetermine whether preview features are enabled or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_PREVIEW_FEATURES.- Specified by:
isPreviewFeaturesin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether preview features are enabled or not.
-
previewFeatures
Description copied from interface:JctCompilerSet whether to enable preview features or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_PREVIEW_FEATURES.- Specified by:
previewFeaturesin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
enabled-trueto enable preview features, orfalseto disable them.- Returns:
- this compiler object for further call chaining.
-
isShowWarnings
Description copied from interface:JctCompilerDetermine whether warnings are enabled or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_SHOW_WARNINGS.- Specified by:
isShowWarningsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether warnings are enabled or not.
-
showWarnings
Description copied from interface:JctCompilerSet whether to enable displaying warnings or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_SHOW_WARNINGS.- Specified by:
showWarningsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
enabled-trueto enable warnings.falseto disable them.- Returns:
- this compiler object for further call chaining.
-
isShowDeprecationWarnings
Description copied from interface:JctCompilerDetermine whether deprecation warnings are enabled or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_SHOW_DEPRECATION_WARNINGS.- Specified by:
isShowDeprecationWarningsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether deprecation warnings are enabled or not.
-
showDeprecationWarnings
Description copied from interface:JctCompilerSet whether to enable deprecation warnings or not.This is ignored if
JctCompiler.showWarnings(boolean)is disabled.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_SHOW_DEPRECATION_WARNINGS.- Specified by:
showDeprecationWarningsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
enabled-trueto enable deprecation warnings.falseto disable them.- Returns:
- this compiler object for further call chaining.
-
isFailOnWarnings
Description copied from interface:JctCompilerDetermine whether warnings are being treated as errors or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_FAIL_ON_WARNINGS.- Specified by:
isFailOnWarningsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether warnings are being treated as errors or not.
-
failOnWarnings
Description copied from interface:JctCompilerSet whether to enable treating warnings as errors or not.This is ignored if
JctCompiler.showWarnings(boolean)is disabled.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_FAIL_ON_WARNINGS.- Specified by:
failOnWarningsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
enabled-trueto enable treating warnings as errors.falseto disable them.- Returns:
- this compiler object for further call chaining.
-
getCompilationMode
Description copied from interface:JctCompilerGet the compilation mode that is in use.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_COMPILATION_MODE.- Specified by:
getCompilationModein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the compilation mode.
-
compilationMode
Description copied from interface:JctCompilerSet the compilation mode to use for this compiler.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_COMPILATION_MODE.- Specified by:
compilationModein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
compilationMode- the compilation mode to use.- Returns:
- this compiler object for further call chaining.
-
getAnnotationProcessorOptions
Description copied from interface:JctCompilerGet an immutable snapshot view of the current annotation processor options that are set.- Specified by:
getAnnotationProcessorOptionsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the current annotation processor options that are set.
-
addAnnotationProcessorOptions
Description copied from interface:JctCompilerAdd options to pass to any annotation processors.- Specified by:
addAnnotationProcessorOptionsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
annotationProcessorOptions- the options to pass.- Returns:
- this compiler object for further call chaining.
-
getAnnotationProcessors
Description copied from interface:JctCompilerGet an immutable snapshot view of the current annotation processors that are explicitly set to be run, in the order that they were provided to the compiler.- Specified by:
getAnnotationProcessorsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the current annotation processors that are set.
-
addAnnotationProcessors
Description copied from interface:JctCompilerAdd annotation processors to invoke.This bypasses the discovery process of annotation processors provided in the annotation processor path.
- Specified by:
addAnnotationProcessorsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
annotationProcessors- the processors to invoke.- Returns:
- this compiler object for further call chaining.
-
getCompilerOptions
Description copied from interface:JctCompilerGet an immutable snapshot view of the current compiler options that are set.- Specified by:
getCompilerOptionsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the current compiler options that are set.
-
addCompilerOptions
Description copied from interface:JctCompilerAdd command line options to pass tojavac.- Specified by:
addCompilerOptionsin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
compilerOptions- the options to add.- Returns:
- this compiler object for further call chaining.
-
getEffectiveRelease
Description copied from interface:JctCompilerGet the effective release to use for the actual compilation.This may be determined from the
source,target,release, anddefault release.- Specified by:
getEffectiveReleasein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the effective release.
-
getRelease
Description copied from interface:JctCompilerGet the current release version that is set, ornullif left to the compiler to decide. default.Unless explicitly defined, the default setting is expected to be a sane compiler-specific default.
- Specified by:
getReleasein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the release version string, if set.
-
release
Description copied from interface:JctCompilerSet the release version.This will clear any source and target version that is set.
Unless explicitly defined, the default setting is expected to be a sane compiler-specific default.
- Specified by:
releasein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
release- the version to set.- Returns:
- this compiler object for further call chaining.
-
getSource
Description copied from interface:JctCompilerGet the current source version that is set, ornullif left to the compiler to decide. default.Unless explicitly defined, the default setting is expected to be a sane compiler-specific default.
- Specified by:
getSourcein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the source version string, if set.
-
source
Description copied from interface:JctCompilerSet the source version.This will clear any release version that is set.
Unless explicitly defined, the default setting is expected to be a sane compiler-specific default.
- Specified by:
sourcein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
source- the version to set.- Returns:
- this compiler object for further call chaining.
-
getTarget
Description copied from interface:JctCompilerGet the current target version that is set, ornullif left to the compiler default.Unless explicitly defined, the default setting is expected to be a sane compiler-specific default.
- Specified by:
getTargetin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the target version string, if set.
-
target
Description copied from interface:JctCompilerSet the target version.This will clear any release version that is set.
Unless explicitly defined, the default setting is expected to be a sane compiler-specific default.
- Specified by:
targetin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
target- the version to set.- Returns:
- this compiler object for further call chaining.
-
isFixJvmModulePathMismatch
Description copied from interface:JctCompilerGet whether we will attempt to fix modules appearing on the classpath, or non-modules appearing on the module path.This enables correct classpath and module path detection when the test pack is a module but the code being compiled in the test is not, and vice versa. We need this because many build systems decide whether to populate the
--module-pathflat or the--classpathwith JPMS-enabled dependencies based on whether the project under compilation is a JPMS module itself.This only applies if
JctCompiler.isInheritModulePath()orJctCompiler.isInheritClassPath()is enabled, and only applies to the current JVM classpath and module path.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_FIX_JVM_MODULE_PATH_MISMATCH.- Specified by:
isFixJvmModulePathMismatchin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
trueif enabled, orfalseif disabled.
-
fixJvmModulePathMismatch
Description copied from interface:JctCompilerGet whether we will attempt to fix modules appearing on the classpath, or non-modules appearing on the module path.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_FIX_JVM_MODULE_PATH_MISMATCH.- Specified by:
fixJvmModulePathMismatchin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
fixJvmModulePathMismatch- whether to enable the mismatch fixing or not.- Returns:
- this compiler object for further call chaining.
-
isInheritClassPath
Description copied from interface:JctCompilerGet whether the class path is inherited from the caller JVM or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_INHERIT_CLASS_PATH.- Specified by:
isInheritClassPathin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether the current class path is being inherited or not.
-
inheritClassPath
Description copied from interface:JctCompilerSet whether the class path is inherited from the caller JVM or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_INHERIT_CLASS_PATH.- Specified by:
inheritClassPathin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
inheritClassPath-trueto include it, orfalseto exclude it.- Returns:
- this compiler object for further call chaining.
-
isInheritModulePath
Description copied from interface:JctCompilerGet whether the module path is inherited from the caller JVM or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_INHERIT_MODULE_PATH.- Specified by:
isInheritModulePathin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether the module path is being inherited or not.
-
inheritModulePath
Description copied from interface:JctCompilerSet whether the module path is inherited from the caller JVM or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_INHERIT_MODULE_PATH.- Specified by:
inheritModulePathin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
inheritModulePath-trueto include it, orfalseto exclude it.- Returns:
- this compiler object for further call chaining.
-
isInheritPlatformClassPath
Description copied from interface:JctCompilerGet whether the current platform class path is being inherited from the caller JVM or not.This may also be known as the "bootstrap class path".
Default environments probably will not provide this functionality, in which case it will be ignored.
Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_INHERIT_PLATFORM_CLASS_PATH.- Specified by:
isInheritPlatformClassPathin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether the platform class path is being inherited or not.
-
inheritPlatformClassPath
Description copied from interface:JctCompilerSet whether the current platform class path is being inherited from the caller JVM or not.This may also be known as the "bootstrap class path".
Default environments probably will not provide this functionality, in which case it will be ignored.
- Specified by:
inheritPlatformClassPathin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
inheritPlatformClassPath-trueto include it, orfalseto exclude it.- Returns:
- this compiler object for further call chaining.
-
isInheritSystemModulePath
Description copied from interface:JctCompilerGet whether the system module path is inherited from the caller JVM or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_INHERIT_SYSTEM_MODULE_PATH.- Specified by:
isInheritSystemModulePathin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- whether the system module path is being inherited or not.
-
inheritSystemModulePath
Description copied from interface:JctCompilerSet whether the system module path is inherited from the caller JVM or not.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_INHERIT_SYSTEM_MODULE_PATH.- Specified by:
inheritSystemModulePathin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
inheritSystemModulePath-trueto include it, orfalseto exclude it.- Returns:
- this compiler object for further call chaining.
-
getLocale
Description copied from interface:JctCompilerGet the output locale.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_LOCALE.- Specified by:
getLocalein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the output locale to use.
-
locale
Description copied from interface:JctCompilerSet the output locale.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_LOCALE.- Specified by:
localein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
locale- the locale to use.- Returns:
- this compiler for further call chaining.
-
getLogCharset
Description copied from interface:JctCompilerGet the charset being used to write compiler logs with.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_LOG_CHARSET.- Specified by:
getLogCharsetin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the charset.
-
logCharset
Description copied from interface:JctCompilerSet the charset being used to write compiler logs with.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_LOG_CHARSET.- Specified by:
logCharsetin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
logCharset- the charset to use.- Returns:
- this compiler for further call chaining.
-
getFileManagerLoggingMode
Description copied from interface:JctCompilerGet the current file manager logging mode.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_FILE_MANAGER_LOGGING_MODE.- Specified by:
getFileManagerLoggingModein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the current file manager logging mode.
-
fileManagerLoggingMode
Description copied from interface:JctCompilerSet how to handle logging calls to underlying file managers.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_FILE_MANAGER_LOGGING_MODE.- Specified by:
fileManagerLoggingModein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
fileManagerLoggingMode- the mode to use for file manager logging.- Returns:
- this compiler for further call chaining.
-
getDiagnosticLoggingMode
Description copied from interface:JctCompilerGet the current diagnostic logging mode.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_DIAGNOSTIC_LOGGING_MODE.- Specified by:
getDiagnosticLoggingModein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the current diagnostic logging mode.
-
diagnosticLoggingMode
Description copied from interface:JctCompilerSet how to handle diagnostic capture.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_DIAGNOSTIC_LOGGING_MODE.- Specified by:
diagnosticLoggingModein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
diagnosticLoggingMode- the mode to use for diagnostic capture.- Returns:
- this compiler for further call chaining.
-
getAnnotationProcessorDiscovery
Description copied from interface:JctCompilerGet how to perform annotation processor discovery.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_ANNOTATION_PROCESSOR_DISCOVERY.Specifying any annotation processors explicitly with
JctCompiler.addAnnotationProcessors(Iterable)orJctCompiler.addAnnotationProcessors(Processor, Processor...)will bypass this setting, treating it as being disabled.- Specified by:
getAnnotationProcessorDiscoveryin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the processor discovery mode to use.
-
annotationProcessorDiscovery
Description copied from interface:JctCompilerSet how to perform annotation processor discovery.Unless otherwise changed or specified, implementations should default to
JctCompiler.DEFAULT_ANNOTATION_PROCESSOR_DISCOVERY.Specifying any annotation processors explicitly with
JctCompiler.addAnnotationProcessors(Iterable)orJctCompiler.addAnnotationProcessors(Processor, Processor...)will bypass this setting, treating it as being disabled.- Specified by:
annotationProcessorDiscoveryin interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Parameters:
annotationProcessorDiscovery- the processor discovery mode to use.- Returns:
- this compiler for further call chaining.
-
toString
Deprecated.UsegetName()instead.Get the compiler name. -
getFlagBuilderFactory
Get the flag builder factory to use for building flags.- Returns:
- the factory.
-
getCompilerFactory
Get the JSR-199 compiler factory to use for initialising an internal compiler.- Returns:
- the factory.
-
getFileManagerFactory
Get the file manager factory to use for building a file manager during compilation.- Returns:
- the factory.
-
getCompilationFactory
Get the compilation factory to use for building a compilation.By default, this uses a common internal implementation that is designed to work with compilers that have interfaces the same as, and behave the same as Javac.
Some obscure compiler implementations with potentially satanic rituals for initialising and configuring components correctly may need to provide a custom implementation here instead. In this case, this method should be overridden.
- Returns:
- the compilation factory.
-
getDefaultRelease
Get the default release to use if no release or target version is specified.This can not be configured.
- Specified by:
getDefaultReleasein interfaceJctCompiler<A extends AbstractJctCompiler<A>,JctCompilation> - Returns:
- the default release version to use when no version is specified by the user.
-
myself
Get this implementation ofAbstractJctCompiler, cast to the type parameterAbstractJctCompiler.- Returns:
- this implementation of
AbstractJctCompiler, cast toAbstractJctCompiler.
-
buildFlags
Build the list of flags from this compiler object using the flag builder.Implementations should not need to override this unless there is a special edge case that needs configuring differently. This is exposed to assist in these kinds of cases.
- Parameters:
flagBuilder- the flag builder to apply the flag configuration to.- Returns:
- the string flags to use.
-
getName()instead.