java.lang.Object | ||
↳ | sun.tools.java.Environment | |
↳ | sun.tools.javac.BatchEnvironment |
![]() |
Main environment of the batch version of the Java compiler, this needs more work. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
binaryPath | The path we use for finding class (binary) files. | ||||||||||
covFile | coverage data file | ||||||||||
errorLimit | Maximum number of errors to print. | ||||||||||
flags | flags | ||||||||||
majorVersion | Major and minor versions to use for generated class files. | ||||||||||
minorVersion | |||||||||||
ndeprecations | |||||||||||
nerrors | The number of errors and warnings | ||||||||||
nwarnings | |||||||||||
sourcePath | The path we use for finding source files. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Old constructors -- these constructors build a BatchEnvironment
with an old-style class path.
| |||||||||||
New constructors -- these constructors build a BatchEnvironment
with a source path and a binary path.
| |||||||||||
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check if a class exists
Applies only to package members (non-nested classes).
| |||||||||||
Issue an error
| |||||||||||
Error String
| |||||||||||
Get a class, given the fully qualified class name
| |||||||||||
Return a class declaration given a type.
| |||||||||||
Return an enumeration of all the currently defined classes
in order of appearance to getClassDeclaration().
| |||||||||||
Return flags
| |||||||||||
Return major version to use for generated class files
| |||||||||||
Return minor version to use for generated class files
| |||||||||||
Get the package path for a package
| |||||||||||
Return coverage data file
| |||||||||||
Tells whether an Identifier refers to a package which should be
exempt from the "exists" check in Imports#resolve().
| |||||||||||
Load the definition of a class
or at least determine how to load it.
| |||||||||||
Create a new class.
| |||||||||||
Create a new field.
| |||||||||||
Output a string.
| |||||||||||
Parse a source file
| |||||||||||
Flush outstanding errors
| |||||||||||
Report error
| |||||||||||
Release resources in classpath.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Insert an error message in the list of outstanding error messages.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Maximum number of errors to print.
flags
Major and minor versions to use for generated class files. Environments that extend BatchEnvironment (such as javadoc's Env class) get the default values below. javac itself may override these versions with values determined from the command line "-target" option.
The number of errors and warnings
Old constructors -- these constructors build a BatchEnvironment with an old-style class path.
New constructors -- these constructors build a BatchEnvironment with a source path and a binary path.
Check if a class exists Applies only to package members (non-nested classes).
Issue an error
Get a class, given the fully qualified class name
Return a class declaration given a type. Only works for class types.
Return an enumeration of all the currently defined classes in order of appearance to getClassDeclaration().
Return flags
Return major version to use for generated class files
Return minor version to use for generated class files
Tells whether an Identifier refers to a package which should be exempt from the "exists" check in Imports#resolve().
Load the definition of a class or at least determine how to load it. The caller must repeat calls to this method until it the state converges to CS_BINARY, CS_PARSED, or the like..
Create a new class.
Create a new field.
Output a string. This can either be an error message or something for debugging.
Flush outstanding errors
Release resources in classpath.
Insert an error message in the list of outstanding error messages. The list is sorted on input position and contains no duplicates. The return value indicates whether or not the message was actually inserted. The method flushErrors() used to check for duplicate error messages. It would only detect duplicates if they were contiguous. Removing non-contiguous duplicate error messages is slightly less complicated at insertion time, so the functionality was moved here. This also saves a miniscule number of allocations.