This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Lint.
Categories of warnings that can be generated by the compiler. |
| Modifier and Type | Field and Description |
|---|---|
| private final Context | |
| protected static final Context. | lintKey
The context key for the root Lint object. |
| private final Log | |
| private Names | |
| private final Options | |
| private EnumSet | |
| private Symtab | |
| private EnumSet | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Lint | |
| private EnumSet | |
| private void | |
| private void | |
| public static Lint | |
| public static boolean | |
| public boolean | |
| public boolean | isSuppressed(Lint.
Check if a warning category has been specifically suppressed by means of @SuppressWarnings. |
| public boolean | shouldEmit(JCDiagnostic diag)
Determine if the given diagnostic should be emitted given the state of this instance. |
| public EnumSet | Returns: new warning suppressions applied to symsymbol corresponding to a possibly-annotated declaration symbol)Obtain the set of recognized lint warning categories suppressed at the given symbol's declaration. |
| private EnumSet | |
| private EnumSet | |
| public String |
| context | back to summary |
|---|---|
| private final Context context | |
| lintKey | back to summary |
|---|---|
| protected static final Context. The context key for the root Lint object. | |
| log | back to summary |
|---|---|
| private final Log log | |
| names | back to summary |
|---|---|
| private Names names | |
| options | back to summary |
|---|---|
| private final Options options | |
| suppressedValues | back to summary |
|---|---|
| private EnumSet<Lint. | |
| syms | back to summary |
|---|---|
| private Symtab syms | |
| values | back to summary |
|---|---|
| private EnumSet<Lint. | |
| withinDeprecated | back to summary |
|---|---|
| private boolean withinDeprecated | |
| Lint | back to summary |
|---|---|
protected Lint(Context context)
| |
| Lint | back to summary |
|---|---|
| protected Lint(Lint other) | |
| augment | back to summary |
|---|---|
| public Lint augment(Symbol sym) Obtain an instance with additional warning supression applied from any | |
| getDefaults | back to summary |
|---|---|
| private EnumSet | |
| initializeRootIfNeeded | back to summary |
|---|---|
| private void initializeRootIfNeeded() | |
| initializeSymbolsIfNeeded | back to summary |
|---|---|
| private void initializeSymbolsIfNeeded() | |
| instance | back to summary |
|---|---|
| public static Lint instance(Context context) Get the root Lint instance. | |
| isDeprecatedDeclaration | back to summary |
|---|---|
| public static boolean isDeprecatedDeclaration(Symbol sym) | |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(Lint. Checks if a warning category is enabled. A warning category may be enabled on the command line, or by default, and can be temporarily disabled with the SuppressWarnings annotation. | |
| isSuppressed | back to summary |
|---|---|
| public boolean isSuppressed(Lint. Check if a warning category has been specifically suppressed by means of @SuppressWarnings. Always returns false for categories that are not suppressible by the annotation, even if they (uselessly) happen to appear in one. | |
| shouldEmit | back to summary |
|---|---|
| public boolean shouldEmit(JCDiagnostic diag) Determine if the given diagnostic should be emitted given the state of this instance. | |
| suppressionsFrom | back to summary |
|---|---|
| public EnumSet Obtain the set of recognized lint warning categories suppressed at the given symbol's declaration.
This set can be non-empty only if the symbol is annotated with @SuppressWarnings, and only categories
for which
| |
| suppressionsFrom | back to summary |
|---|---|
| private EnumSet | |
| suppressionsFrom | back to summary |
|---|---|
| private EnumSet | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
SuppressWarning annotation.
To ensure automation, the enum field name for a lint category string C should be obtained by:
C, and- with _dangling-doc-comments corresponds to the enum field
DANGLING_DOC_COMMENTS.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum |
| Modifier and Type | Field and Description |
|---|---|
| public final boolean | annotationSuppression
Does this category support being suppressed by the |
| public static final Lint. | AUXILIARYCLASS
Warn when code refers to a auxiliary class that is hidden in a source file (ie source file name is different from the class name, and the type is not properly nested) and the referring code is not located in the same source file. |
| public static final Lint. | CAST
Warn about use of unnecessary casts. |
| public static final Lint. | CLASSFILE
Warn about issues related to classfile contents. |
| public static final Lint. | DANGLING_DOC_COMMENTS
Warn about "dangling" documentation comments, not attached to any declaration. |
| public static final Lint. | DEP_ANN
Warn about items which are documented with an |
| public static final Lint. | DEPRECATION
Warn about use of deprecated items. |
| public static final Lint. | DIVZERO
Warn about division by constant integer 0. |
| public static final Lint. | EMPTY
Warn about empty statement after if. |
| public final boolean | enabledByDefault
Is this category included in the default set of enabled lint categories? |
| public static final Lint. | EXPORTS
Warn about issues regarding module exports. |
| public static final Lint. | FALLTHROUGH
Warn about falling through from one case of a switch statement to the next. |
| public static final Lint. | FINALLY
Warn about finally clauses that do not terminate normally. |
| public static final Lint. | IDENTITY
Warn about uses of @ValueBased classes where an identity class is expected. |
| public static final Lint. | INCUBATING
Warn about use of incubating modules. |
| private static final SequencedMap | |
| public static final Lint. | LOSSY_CONVERSIONS
Warn about compiler possible lossy conversions. |
| public static final Lint. | MISSING_EXPLICIT_CTOR
Warn about compiler generation of a default constructor. |
| public static final Lint. | MODULE
Warn about module system related issues. |
| public static final Lint. | OPENS
Warn about issues regarding module opens. |
| public final String | option
Get the "canonical" string representing this category in @SuppressAnnotations and -Xlint options. |
| public final List | optionList
Get a list containing "option" followed by zero or more aliases. |
| public static final Lint. | OPTIONS
Warn about issues relating to use of command line options. |
| public static final Lint. | OUTPUT_FILE_CLASH
Warn when any output file is written to more than once. |
| public static final Lint. | OVERLOADS
Warn about issues regarding method overloads. |
| public static final Lint. | OVERRIDES
Warn about issues regarding method overrides. |
| public static final Lint. | PATH
Warn about invalid path elements on the command line. |
| public static final Lint. | PREVIEW
Warn about use of preview features. |
| public static final Lint. | PROCESSING
Warn about issues regarding annotation processing. |
| public static final Lint. | RAWTYPES
Warn about unchecked operations on raw types. |
| public static final Lint. | REMOVAL
Warn about use of deprecated-for-removal items. |
| public static final Lint. | REQUIRES_AUTOMATIC
Warn about use of automatic modules in the requires clauses. |
| public static final Lint. | REQUIRES_TRANSITIVE_AUTOMATIC
Warn about automatic modules in requires transitive. |
| public static final Lint. | RESTRICTED
Warn about use of restricted methods. |
| public static final Lint. | SERIAL
Warn about Serializable classes that do not provide a serial version ID. |
| public static final Lint. | STATIC
Warn about issues relating to use of statics |
| public static final Lint. | STRICTFP
Warn about unnecessary uses of the strictfp modifier |
| public static final Lint. | TEXT_BLOCKS
Warn about issues relating to use of text blocks |
| public static final Lint. | THIS_ESCAPE
Warn about possible 'this' escapes before subclass instance is fully initialized. |
| public static final Lint. | TRY
Warn about issues relating to use of try blocks (i.e. try-with-resources) |
| public static final Lint. | UNCHECKED
Warn about unchecked operations on raw types. |
| public static final Lint. | VARARGS
Warn about potentially unsafe vararg methods |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static SequencedMap | |
| public static Optional | Returns: correspondingLintCategory, or empty if none existslint category option string option)Get the |
| public static EnumSet | |
| public static SequencedSet | |
| public static Lint. | |
| public static Lint. |
| annotationSuppression | back to summary |
|---|---|
| public final boolean annotationSuppression Does this category support being suppressed by the | |
| AUXILIARYCLASS | back to summary |
|---|---|
| public static final Lint. Warn when code refers to a auxiliary class that is hidden in a source file (ie source file name is different from the class name, and the type is not properly nested) and the referring code is not located in the same source file. | |
| CAST | back to summary |
|---|---|
| public static final Lint. Warn about use of unnecessary casts. | |
| CLASSFILE | back to summary |
|---|---|
| public static final Lint. Warn about issues related to classfile contents.
This category is not supported by | |
| DANGLING_DOC_COMMENTS | back to summary |
|---|---|
| public static final Lint. Warn about "dangling" documentation comments, not attached to any declaration. | |
| DEP_ANN | back to summary |
|---|---|
| public static final Lint. Warn about items which are documented with an | |
| DEPRECATION | back to summary |
|---|---|
| public static final Lint. Warn about use of deprecated items. | |
| DIVZERO | back to summary |
|---|---|
| public static final Lint. Warn about division by constant integer 0. | |
| EMPTY | back to summary |
|---|---|
| public static final Lint. Warn about empty statement after if. | |
| enabledByDefault | back to summary |
|---|---|
| public final boolean enabledByDefault Is this category included in the default set of enabled lint categories? Note that for some categories, command line options can alter this at runtime. | |
| EXPORTS | back to summary |
|---|---|
| public static final Lint. Warn about issues regarding module exports. | |
| FALLTHROUGH | back to summary |
|---|---|
| public static final Lint. Warn about falling through from one case of a switch statement to the next. | |
| FINALLY | back to summary |
|---|---|
| public static final Lint. Warn about finally clauses that do not terminate normally. | |
| IDENTITY | back to summary |
|---|---|
| public static final Lint. Warn about uses of @ValueBased classes where an identity class is expected. | |
| INCUBATING | back to summary |
|---|---|
| public static final Lint. Warn about use of incubating modules.
This category is not supported by | |
| lookup | back to summary |
|---|---|
| private static final SequencedMap<String, Lint. | |
| LOSSY_CONVERSIONS | back to summary |
|---|---|
| public static final Lint. Warn about compiler possible lossy conversions. | |
| MISSING_EXPLICIT_CTOR | back to summary |
|---|---|
| public static final Lint. Warn about compiler generation of a default constructor. | |
| MODULE | back to summary |
|---|---|
| public static final Lint. Warn about module system related issues. | |
| OPENS | back to summary |
|---|---|
| public static final Lint. Warn about issues regarding module opens. | |
| option | back to summary |
|---|---|
| public final String option Get the "canonical" string representing this category in @SuppressAnnotations and -Xlint options. | |
| optionList | back to summary |
|---|---|
| public final List<String> optionList Get a list containing "option" followed by zero or more aliases. | |
| OPTIONS | back to summary |
|---|---|
| public static final Lint. Warn about issues relating to use of command line options.
This category is not supported by | |
| OUTPUT_FILE_CLASH | back to summary |
|---|---|
| public static final Lint. Warn when any output file is written to more than once.
This category is not supported by | |
| OVERLOADS | back to summary |
|---|---|
| public static final Lint. Warn about issues regarding method overloads. | |
| OVERRIDES | back to summary |
|---|---|
| public static final Lint. Warn about issues regarding method overrides. | |
| PATH | back to summary |
|---|---|
| public static final Lint. Warn about invalid path elements on the command line.
This category is not supported by | |
| PREVIEW | back to summary |
|---|---|
| public static final Lint. Warn about use of preview features. | |
| PROCESSING | back to summary |
|---|---|
| public static final Lint. Warn about issues regarding annotation processing.
This category is not supported by | |
| RAWTYPES | back to summary |
|---|---|
| public static final Lint. Warn about unchecked operations on raw types. | |
| REMOVAL | back to summary |
|---|---|
| public static final Lint. Warn about use of deprecated-for-removal items. | |
| REQUIRES_AUTOMATIC | back to summary |
|---|---|
| public static final Lint. Warn about use of automatic modules in the requires clauses. | |
| REQUIRES_TRANSITIVE_AUTOMATIC | back to summary |
|---|---|
| public static final Lint. Warn about automatic modules in requires transitive. | |
| RESTRICTED | back to summary |
|---|---|
| public static final Lint. Warn about use of restricted methods. | |
| SERIAL | back to summary |
|---|---|
| public static final Lint. Warn about Serializable classes that do not provide a serial version ID. | |
| STATIC | back to summary |
|---|---|
| public static final Lint. Warn about issues relating to use of statics | |
| STRICTFP | back to summary |
|---|---|
| public static final Lint. Warn about unnecessary uses of the strictfp modifier | |
| TEXT_BLOCKS | back to summary |
|---|---|
| public static final Lint. Warn about issues relating to use of text blocks | |
| THIS_ESCAPE | back to summary |
|---|---|
| public static final Lint. Warn about possible 'this' escapes before subclass instance is fully initialized. | |
| TRY | back to summary |
|---|---|
| public static final Lint. Warn about issues relating to use of try blocks (i.e. try-with-resources) | |
| UNCHECKED | back to summary |
|---|---|
| public static final Lint. Warn about unchecked operations on raw types. | |
| VARARGS | back to summary |
|---|---|
| public static final Lint. Warn about potentially unsafe vararg methods | |
| LintCategory | back to summary |
|---|---|
| private LintCategory(String option, Lint. | |
| LintCategory | back to summary |
|---|---|
| private LintCategory(List<String> options, Lint. | |
| createLookup | back to summary |
|---|---|
| private static SequencedMap | |
| get | back to summary |
|---|---|
| public static Optional Get the
| |
| newEmptySet | back to summary |
|---|---|
| public static EnumSet | |
| options | back to summary |
|---|---|
| public static SequencedSet Get all lint category option strings and aliases. | |
| valueOf | back to summary |
|---|---|
| public static Lint. | |
| values | back to summary |
|---|---|
| public static Lint. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Lint. | |
| public static final Lint. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Lint. | |
| public static Lint. |
| ENABLED_BY_DEFAULT | back to summary |
|---|---|
| public static final Lint. | |
| NO_ANNOTATION_SUPPRESSION | back to summary |
|---|---|
| public static final Lint. | |
| Property | back to summary |
|---|---|
| private Property() | |
| valueOf | back to summary |
|---|---|
| public static Lint. | |
| values | back to summary |
|---|---|
| public static Lint. | |