From 3159b36f8178b98cfad099b94c5f6f9befb2b901 Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Thu, 30 May 2024 15:16:45 +0800 Subject: [PATCH] Add javadoc for the new CompilerConfiguration class --- .../core/compiler/CompilerConfiguration.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilerConfiguration.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilerConfiguration.java index f2a83b9707b..358c8d7df59 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilerConfiguration.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilerConfiguration.java @@ -20,7 +20,17 @@ import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; /** + * This class encapsulates the standard compiler options that can be + * used to compile Java files. It provides methods to set and retrieve + * various compiler options, including source paths, class paths, + * output directories, annotation processing options, and other compiler + * arguments. + * + * Clients typically use this class when opting for an alternative compiler + * like Javac to compile Java files. + * * @since 3.38 + * @noextend This class is not intended to be subclassed by clients. */ public class CompilerConfiguration { List sourcepaths; @@ -34,66 +44,125 @@ public class CompilerConfiguration { // Locations to place generated source files. List generatedSourcePaths; + /** + * Returns where to find user class files and annotation processors. + */ public List getClasspaths() { return this.classpaths; } + /** + * Sets where to find user class files and annotation processors. + * @param classpaths the list of class paths + */ public void setClasspaths(List classpaths) { this.classpaths = classpaths; } + /** + * Returns where to find modules. + */ public List getModulepaths() { return this.modulepaths; } + /** + * Sets where to find modules. + * @param modulepaths the list of module paths + */ public void setModulepaths(List modulepaths) { this.modulepaths = modulepaths; } + /** + * Returns the source code path to search for class or interface definitions. + */ public List getSourcepaths() { return this.sourcepaths; } + /** + * Sets the source code path to search for class or interface definitions. + * @param sourcepaths the list of source paths + */ public void setSourcepaths(List sourcepaths) { this.sourcepaths = sourcepaths; } + /** + * Returns where to find source files when compiling modules. + */ public List getModuleSourcepaths() { return this.moduleSourcepaths; } + /** + * Sets where to find source files when compiling modules. + * @param moduleSourcepaths the list of module source paths + */ public void setModuleSourcepaths(List moduleSourcepaths) { this.moduleSourcepaths = moduleSourcepaths; } + /** + * Returns the mapping of source files to output directories. + */ public Map getSourceOutputMapping() { return this.sourceOutputMapping; } + /** + * Sets the mapping of source files to output directories. + * @param sourceOutputMapping the source output mapping + */ public void setSourceOutputMapping(Map sourceOutputMapping) { this.sourceOutputMapping = sourceOutputMapping; } + /** + * Returns the compiler options to be used for compilation. + * + * @see {@link org.eclipse.jdt.internal.compiler.impl.CompilerOptions} for a list of available options. + */ public CompilerOptions getOptions() { return this.options; } + /** + * Sets the compiler options to be used for compilation. + * @param options the compiler options + * @see {@link org.eclipse.jdt.internal.compiler.impl.CompilerOptions} for a list of available options. + */ public void setOptions(CompilerOptions options) { this.options = options; } + /** + * Returns the locations to search for annotation processors. + */ public List getAnnotationProcessorPaths() { return this.annotationProcessorPaths; } + /** + * Sets the locations to search for annotation processors. + * @param annotationProcessorPaths the list of annotation processor paths + */ public void setAnnotationProcessorPaths(List annotationProcessorPaths) { this.annotationProcessorPaths = annotationProcessorPaths; } + /** + * Returns the locations to place generated source files. + */ public List getGeneratedSourcePaths() { return this.generatedSourcePaths; } + /** + * Sets the locations to place generated source files. + * @param generatedSourcePaths the list of generated source paths + */ public void setGeneratedSourcePaths(List generatedSourcePaths) { this.generatedSourcePaths = generatedSourcePaths; }