Class BuildArgParser
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.batch.Main
org.aspectj.ajdt.ajc.BuildArgParser
- All Implemented Interfaces:
ProblemSeverities, SuffixConstants
-
Nested Class Summary
Nested classes/interfaces inherited from class Main
Main.Logger, Main.ResourceBundleFactoryModifier and TypeClassDescriptionstatic classstatic classResource bundle factory to share bundles for the same locale -
Field Summary
Fields inherited from class Main
annotationPaths, annotationsFromClasspath, aspectjLocale, batchCompiler, bundle, bundleName, checkedClasspaths, classNames, compilerLocale, compilerOptions, compilerStats, complianceLevel, currentRepetition, DEFAULT_SIZE_CLASSPATH, destinationPath, destinationPaths, enablePreview, encodings, exportedClassFilesCounter, extraProblems, failOnWarning, filenames, globalErrorsCount, globalInfoCount, globalProblemsCount, globalTasksCount, globalWarningsCount, ignoreOptionalProblemsFromFolders, limitedModules, lineCount0, log, logger, maxProblems, maxRepetition, modNames, module, NONE, options, out, pendingErrors, proceed, proceedOnError, produceRefInfo, progress, releaseVersion, rootModules, showProgress, startTime, systemExitWhenFinished, timing, TIMING_DETAILED, TIMING_DISABLED, TIMING_ENABLED, verboseModifier and TypeFieldDescriptionprotected booleanstatic final Localestatic final Stringprotected FileSystem.Classpath[]String[]protected longintstatic final intString[]protected booleanString[]intprotected ArrayList<CategorizedProblem> booleanString[]intintintintintchar[][]longintintString[]protected IModulestatic final Stringprotected PrintWriterbooleanbooleanbooleanprotected Stringbooleanlongbooleanintstatic final intstatic final intstatic final intbooleanFields inherited from interface ProblemSeverities
Abort, AbortCompilation, AbortCompilationUnit, AbortMethod, AbortType, CoreSeverityMASK, Error, Fatal, Ignore, Info, InternalError, Optional, SecondaryError, WarningModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from interface SuffixConstants
EXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, EXTENSION_jmod, EXTENSION_JMOD, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVAModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final char[]static final char[]static final char[]static final char[]static final char[]static final char[]static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionBuildArgParser(PrintWriter writer, IMessageHandler handler) Overrides super's bundle.BuildArgParser(IMessageHandler handler) Set up to capture messages using getOtherMessages(boolean) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtraProblems(CategorizedProblem problem) booleancheckVMVersion(long minimalSupportedVersion) genBuildConfig(String[] args) Generate build configuration for the input args, passing to handler any error messages.getBootclasspath(org.aspectj.ajdt.ajc.BuildArgParser.AjcConfigParser parser) getClasspath(org.aspectj.ajdt.ajc.BuildArgParser.AjcConfigParser parser) If the classpath is not set, we use the environment's java.class.path, but remove the aspectjtools.jar entry from that list in order to prevent wierd bootstrap issues (refer to bug#39959).getModulepath(org.aspectj.ajdt.ajc.BuildArgParser.AjcConfigParser parser) getModulesourcepath(org.aspectj.ajdt.ajc.BuildArgParser.AjcConfigParser parser) getOtherMessages(boolean flush) Get messages not dumped to handler or any PrintWriter.static StringgetUsage()static StringhandleClasspath(ArrayList<String> classpaths, String customEncoding) voidvoidinitRootModules(LookupEnvironment environment, FileSystem fileSystem) populateBuildConfig(AjBuildConfig buildConfig, String[] args, boolean setClasspath, File configFile) Generate build configuration for the input arguments, passing to handler any error messages.voidMethods inherited from class Main
_bind, addNewEntry, bind, bind, bind, bind, compile, compile, compile, compile, configure, createCompilationUnit, disableAll, enableAll, extractDestinationPathFromSourceFile, getBatchRequestor, getCompilationUnits, getDefaultEncoding, getHandlingPolicy, getJavaHome, getLibrariesFiles, getLibraryAccess, getModuleDesc, getNewParser, getProblemFactory, handleBootclasspath, handleEndorseddirs, handleErrorToken, handleExtdirs, handleInfoToken, handleModulepath, handleModuleSourcepath, handlePatchModule, handleSingleModuleCompilation, handleWarningToken, initialize, initialize, initialize, isIgnored, loggingExtraProblems, main, outputClassFiles, performCompilation, printUsage, processPathEntries, relocalize, setDestinationPath, setLocale, setPaths, setSeverity, shouldIgnoreOptionalProblems, tokenize, validateClasspathOptions, validateOptionsModifier and TypeMethodDescriptionstatic Stringprotected voidaddNewEntry(ArrayList<FileSystem.Classpath> paths, String currentClasspathName, ArrayList<String> currentRuleSpecs, String customEncoding, String destPath, boolean isSourceOnly, boolean rejectDestinationPathOnJars) static booleanDeprecated.booleanstatic booleancompile(String[] commandLineArguments, PrintWriter outWriter, PrintWriter errWriter, CompilationProgress progress) static booleancompile(String commandLine, PrintWriter outWriter, PrintWriter errWriter) Deprecated.- useBatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress)instead e.g.voidprotected CompilationUnitcreateCompilationUnit(int idx, String filename) protected voiddisableAll(int severity) protected voidenableAll(int severity) static File[][]getLibrariesFiles(File[] files) getModuleDesc(String moduleArgument, Supplier<CompilationUnit> cuSupplier) protected ArrayList<FileSystem.Classpath> handleBootclasspath(ArrayList<String> bootclasspaths, String customEncoding) protected ArrayList<FileSystem.Classpath> handleEndorseddirs(ArrayList<String> endorsedDirClasspaths) protected voidhandleErrorToken(String token, boolean isEnabling) protected ArrayList<FileSystem.Classpath> handleExtdirs(ArrayList<String> extdirsClasspaths) protected voidhandleInfoToken(String token, boolean isEnabling) protected ArrayList<FileSystem.Classpath> handleModulepath(String arg) protected ArrayList<FileSystem.Classpath> protected voidAssociate patching source files to their modules.protected voidprotected voidhandleWarningToken(String token, boolean isEnabling) protected voidinitialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit) Deprecated.- useMain.initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)instead e.g.protected voidinitialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map<String, String> customDefaultOptions) Deprecated.- useMain.initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)instead e.g.protected voidinitialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map<String, String> customDefaultOptions, CompilationProgress compilationProgress) protected booleanprotected voidstatic voidvoidoutputClassFiles(CompilationResult unitResult) voidvoidvoidprocessPathEntries(int defaultSize, ArrayList<FileSystem.Classpath> paths, String currentPath, String customEncoding, boolean isSourceOnly, boolean rejectDestinationPathOnJars) voidCreates a NLS catalog for the given locale.voidsetDestinationPath(String dest) voidprotected voidsetPaths(ArrayList<String> bootclasspaths, String sourcepathClasspathArg, ArrayList<String> sourcepathClasspaths, ArrayList<String> classpaths, String modulePath, String moduleSourcepath, ArrayList<String> extdirsClasspaths, ArrayList<String> endorsedDirClasspaths, String customEncoding) protected voidsetSeverity(String compilerOptions, int severity, boolean isEnabling) static final booleanshouldIgnoreOptionalProblems(char[][] folderNames, char[] fileName) static String[]protected longvalidateClasspathOptions(ArrayList<String> bootclasspaths, ArrayList<String> endorsedDirClasspaths, ArrayList<String> extdirsClasspaths) protected voidvalidateOptions(boolean didSpecifyCompliance)
-
Constructor Details
-
BuildArgParser
Overrides super's bundle. -
BuildArgParser
Set up to capture messages using getOtherMessages(boolean)
-
-
Method Details
-
getUsage
- Returns:
- multi-line String usage for the compiler
-
getXOptionUsage
-
genBuildConfig
Generate build configuration for the input args, passing to handler any error messages.- Parameters:
args- the String[] arguments for the build configuration- Returns:
- AjBuildConfig per args, which will be invalid unless there are no handler errors.
-
populateBuildConfig
public AjBuildConfig populateBuildConfig(AjBuildConfig buildConfig, String[] args, boolean setClasspath, File configFile) Generate build configuration for the input arguments, passing to handler any error messages.- Parameters:
args- the String[] arguments for the build configurationsetClasspath- determines if the classpath should be parsed and set on the build configurationconfigFile- can be null- Returns:
- AjBuildConfig per arguments, which will be invalid unless there are no handler errors.
-
printVersion
public void printVersion()- Overrides:
printVersionin classMain
-
addExtraProblems
- Overrides:
addExtraProblemsin classMain
-
initializeAnnotationProcessorManager
public void initializeAnnotationProcessorManager()- Overrides:
initializeAnnotationProcessorManagerin classMain
-
getOtherMessages
Get messages not dumped to handler or any PrintWriter.- Parameters:
flush- if true, empty errors- Returns:
- null if none, String otherwise
- See Also:
-
getBootclasspath
-
getModulepath
-
getModulesourcepath
-
handleClasspath
public ArrayList<FileSystem.Classpath> handleClasspath(ArrayList<String> classpaths, String customEncoding) - Overrides:
handleClasspathin classMain
-
getClasspath
-
getCheckedClasspaths
-
initRootModules
- Overrides:
initRootModulesin classMain
-
checkVMVersion
public boolean checkVMVersion(long minimalSupportedVersion)
-
BatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress)instead e.g.