Class Main
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.batch.Main
- All Implemented Interfaces:
ProblemSeverities
,SuffixConstants
- Direct Known Subclasses:
BuildArgParser
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Resource bundle factory to share bundles for the same locale -
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
static Locale
static String
protected FileSystem.Classpath[]
String[]
protected long
int
static int
String[]
protected boolean
String[]
int
protected ArrayList<CategorizedProblem>
boolean
String[]
int
int
int
int
int
char[][]
long
int
int
String[]
protected IModule
static String
protected PrintWriter
boolean
boolean
boolean
protected String
boolean
long
boolean
int
static int
static int
static int
boolean
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.problem.ProblemSeverities
Abort, AbortCompilation, AbortCompilationUnit, AbortMethod, AbortType, CoreSeverityMASK, Error, Fatal, Ignore, Info, InternalError, Optional, SecondaryError, Warning
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.util.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_JAVA
-
Constructor Summary
ConstructorDescriptionMain(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished)
Deprecated.Main(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished, Map<String,String> customDefaultOptions)
Deprecated.- useMain(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)
instead e.g.Main(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished, Map<String,String> customDefaultOptions, CompilationProgress compilationProgress)
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
void
addExtraProblems(CategorizedProblem problem)
protected void
addNewEntry(ArrayList<FileSystem.Classpath> paths, String currentClasspathName, ArrayList<String> currentRuleSpecs, String customEncoding, String destPath, boolean isSourceOnly, boolean rejectDestinationPathOnJars)
protected boolean
checkVMVersion(long minimalSupportedVersion)
Return true if and only if the running VM supports the given minimal version.static boolean
Deprecated.- useBatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress)
instead e.g.boolean
static boolean
compile(String[] commandLineArguments, PrintWriter outWriter, PrintWriter errWriter, CompilationProgress progress)
static boolean
compile(String commandLine, PrintWriter outWriter, PrintWriter errWriter)
Deprecated.- useBatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress)
instead e.g.void
protected void
disableAll(int severity)
protected void
enableAll(int severity)
static File[][]
getLibrariesFiles(File[] files)
getModuleDesc(String moduleArgument)
protected ArrayList<FileSystem.Classpath>
handleBootclasspath(ArrayList<String> bootclasspaths, String customEncoding)
protected ArrayList<FileSystem.Classpath>
handleClasspath(ArrayList<String> classpaths, String customEncoding)
protected ArrayList<FileSystem.Classpath>
handleEndorseddirs(ArrayList<String> endorsedDirClasspaths)
protected void
handleErrorToken(String token, boolean isEnabling)
protected ArrayList<FileSystem.Classpath>
handleExtdirs(ArrayList<String> extdirsClasspaths)
protected void
handleInfoToken(String token, boolean isEnabling)
protected ArrayList<FileSystem.Classpath>
handleModulepath(String arg)
protected ArrayList<FileSystem.Classpath>
handleModuleSourcepath(String arg)
protected void
handleWarningToken(String token, boolean isEnabling)
protected void
initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit)
Deprecated.- useinitialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)
instead e.g. initialize(outWriter, errWriter, systemExit, null, null)protected void
initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map<String,String> customDefaultOptions)
Deprecated.- useinitialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)
instead e.g. initialize(outWriter, errWriter, systemExit, customDefaultOptions, null)protected void
initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map<String,String> customDefaultOptions, CompilationProgress compilationProgress)
protected void
protected void
initRootModules(LookupEnvironment environment, FileSystem fileSystem)
protected boolean
protected void
static void
void
outputClassFiles(CompilationResult unitResult)
void
void
void
void
processPathEntries(int defaultSize, ArrayList<FileSystem.Classpath> paths, String currentPath, String customEncoding, boolean isSourceOnly, boolean rejectDestinationPathOnJars)
void
Creates a NLS catalog for the given locale.void
setDestinationPath(String dest)
void
protected void
setPaths(ArrayList<String> bootclasspaths, String sourcepathClasspathArg, ArrayList<String> sourcepathClasspaths, ArrayList<String> classpaths, String modulePath, String moduleSourcepath, ArrayList<String> extdirsClasspaths, ArrayList<String> endorsedDirClasspaths, String customEncoding)
static boolean
shouldIgnoreOptionalProblems(char[][] folderNames, char[] fileName)
static String[]
protected long
validateClasspathOptions(ArrayList<String> bootclasspaths, ArrayList<String> endorsedDirClasspaths, ArrayList<String> extdirsClasspaths)
protected void
validateOptions(boolean didSpecifyCompliance)
-
Field Details
-
batchCompiler
-
bundle
-
checkedClasspaths
-
module
-
annotationPaths
-
annotationsFromClasspath
protected boolean annotationsFromClasspath -
rootModules
-
limitedModules
-
compilerLocale
-
compilerOptions
-
progress
-
destinationPath
-
destinationPaths
-
enablePreview
protected boolean enablePreview -
releaseVersion
-
encodings
-
exportedClassFilesCounter
public int exportedClassFilesCounter -
filenames
-
modNames
-
classNames
-
globalErrorsCount
public int globalErrorsCount -
globalProblemsCount
public int globalProblemsCount -
globalTasksCount
public int globalTasksCount -
globalWarningsCount
public int globalWarningsCount -
globalInfoCount
public int globalInfoCount -
lineCount0
public long lineCount0 -
log
-
logger
-
maxProblems
public int maxProblems -
options
-
complianceLevel
protected long complianceLevel -
ignoreOptionalProblemsFromFolders
public char[][] ignoreOptionalProblemsFromFolders -
out
-
proceed
public boolean proceed -
proceedOnError
public boolean proceedOnError -
failOnWarning
public boolean failOnWarning -
produceRefInfo
public boolean produceRefInfo -
currentRepetition
public int currentRepetition -
maxRepetition
public int maxRepetition -
showProgress
public boolean showProgress -
startTime
public long startTime -
pendingErrors
-
systemExitWhenFinished
public boolean systemExitWhenFinished -
TIMING_DISABLED
public static final int TIMING_DISABLED- See Also:
- Constant Field Values
-
TIMING_ENABLED
public static final int TIMING_ENABLED- See Also:
- Constant Field Values
-
TIMING_DETAILED
public static final int TIMING_DETAILED- See Also:
- Constant Field Values
-
timing
public int timing -
compilerStats
-
verbose
public boolean verbose -
extraProblems
-
bundleName
- See Also:
- Constant Field Values
-
aspectjLocale
-
DEFAULT_SIZE_CLASSPATH
public static final int DEFAULT_SIZE_CLASSPATH- See Also:
- Constant Field Values
-
NONE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Main
Deprecated.- useMain(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)
instead e.g. Main(outWriter, errWriter, systemExitWhenFinished, null, null) -
Main
public Main(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished, Map<String,String> customDefaultOptions)Deprecated.- useMain(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)
instead e.g. Main(outWriter, errWriter, systemExitWhenFinished, customDefaultOptions, null) -
Main
public Main(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished, Map<String,String> customDefaultOptions, CompilationProgress compilationProgress)
-
-
Method Details
-
compile
Deprecated.- useBatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress)
instead e.g. BatchCompiler.compile(commandLine, new PrintWriter(System.out), new PrintWriter(System.err), null); -
compile
Deprecated.- useBatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress)
instead e.g. BatchCompiler.compile(commandLine, outWriter, errWriter, null); -
compile
public static boolean compile(String[] commandLineArguments, PrintWriter outWriter, PrintWriter errWriter, CompilationProgress progress) -
getLibrariesFiles
-
main
-
tokenize
-
printVersion
public void printVersion() -
addExtraProblems
-
addNewEntry
-
bind
-
bind
-
_bind
-
bind
-
bind
-
checkVMVersion
protected boolean checkVMVersion(long minimalSupportedVersion)Return true if and only if the running VM supports the given minimal version.This only checks the major version, since the minor version is always 0 (at least for the useful cases).
The given minimalSupportedVersion is one of the constants:
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_1
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_2
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_3
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_4
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_5
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_6
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_7
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_8
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK9
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK10
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK11
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK12
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK13
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK14
- Parameters:
minimalSupportedVersion
- the given minimal version- Returns:
- true if and only if the running VM supports the given minimal version, false otherwise
-
compile
-
configure
-
getModuleDesc
-
enableAll
protected void enableAll(int severity) -
disableAll
protected void disableAll(int severity) -
extractDestinationPathFromSourceFile
-
getBatchRequestor
-
getCompilationUnits
-
getHandlingPolicy
-
getJavaHome
-
getLibraryAccess
-
getProblemFactory
-
handleBootclasspath
protected ArrayList<FileSystem.Classpath> handleBootclasspath(ArrayList<String> bootclasspaths, String customEncoding) -
handleModulepath
-
handleModuleSourcepath
-
handleClasspath
protected ArrayList<FileSystem.Classpath> handleClasspath(ArrayList<String> classpaths, String customEncoding) -
handleEndorseddirs
protected ArrayList<FileSystem.Classpath> handleEndorseddirs(ArrayList<String> endorsedDirClasspaths) -
handleExtdirs
-
isIgnored
-
handleInfoToken
-
handleWarningToken
-
handleErrorToken
-
initialize
Deprecated.- useinitialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)
instead e.g. initialize(outWriter, errWriter, systemExit, null, null) -
initialize
protected void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map<String,String> customDefaultOptions)Deprecated.- useinitialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)
instead e.g. initialize(outWriter, errWriter, systemExit, customDefaultOptions, null) -
initialize
protected void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map<String,String> customDefaultOptions, CompilationProgress compilationProgress) -
initializeAnnotationProcessorManager
protected void initializeAnnotationProcessorManager() -
outputClassFiles
-
performCompilation
public void performCompilation() -
loggingExtraProblems
protected void loggingExtraProblems() -
printUsage
public void printUsage() -
initRootModules
-
processPathEntries
public void processPathEntries(int defaultSize, ArrayList<FileSystem.Classpath> paths, String currentPath, String customEncoding, boolean isSourceOnly, boolean rejectDestinationPathOnJars) -
relocalize
public void relocalize()Creates a NLS catalog for the given locale. -
setDestinationPath
-
setLocale
-
setPaths
protected void setPaths(ArrayList<String> bootclasspaths, String sourcepathClasspathArg, ArrayList<String> sourcepathClasspaths, ArrayList<String> classpaths, String modulePath, String moduleSourcepath, ArrayList<String> extdirsClasspaths, ArrayList<String> endorsedDirClasspaths, String customEncoding) -
shouldIgnoreOptionalProblems
public static final boolean shouldIgnoreOptionalProblems(char[][] folderNames, char[] fileName) -
validateClasspathOptions
-
validateOptions
protected void validateOptions(boolean didSpecifyCompliance)
-
Main(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)
instead e.g.