com.sun.tools.javac.code
Class Lint

java.lang.Object
  extended by com.sun.tools.javac.code.Lint

public class Lint
extends java.lang.Object

A class for handling -Xlint suboptions and @SuppresssWarnings.

This is NOT part of any API supported by Sun Microsystems. 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.


Nested Class Summary
protected static class Lint.AugmentVisitor
           
static class Lint.LintCategory
          Categories of warnings that can be generated by the compiler.
 
Field Summary
private  Lint.AugmentVisitor augmentor
           
protected static Context.Key<Lint> lintKey
          The context key for the root Lint object.
private static java.util.Map<java.lang.String,Lint.LintCategory> map
           
private  java.util.EnumSet<Lint.LintCategory> suppressedValues
           
private  java.util.EnumSet<Lint.LintCategory> values
           
 
Constructor Summary
protected Lint(Context context)
           
protected Lint(Lint other)
           
 
Method Summary
 Lint augment(Attribute.Compound attr)
          Returns the result of combining the values in this object with the given annotation.
 Lint augment(List<Attribute.Compound> attrs)
          Returns the result of combining the values in this object with the given annotations.
 Lint augment(List<Attribute.Compound> attrs, long flags)
          Returns the result of combining the values in this object with the given annotations and flags.
static Lint instance(Context context)
          Get the root Lint instance.
 boolean isEnabled(Lint.LintCategory lc)
          Checks if a warning category is enabled.
 boolean isSuppressed(Lint.LintCategory lc)
          Checks is a warning category has been specifically suppressed, by means of the SuppressWarnings annotation, or, in the case of the deprecated category, whether it has been implicitly suppressed by virtue of the current entity being itself deprecated.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lintKey

protected static final Context.Key<Lint> lintKey
The context key for the root Lint object.


augmentor

private final Lint.AugmentVisitor augmentor

values

private final java.util.EnumSet<Lint.LintCategory> values

suppressedValues

private final java.util.EnumSet<Lint.LintCategory> suppressedValues

map

private static java.util.Map<java.lang.String,Lint.LintCategory> map
Constructor Detail

Lint

protected Lint(Context context)

Lint

protected Lint(Lint other)
Method Detail

instance

public static Lint instance(Context context)
Get the root Lint instance.


augment

public Lint augment(Attribute.Compound attr)
Returns the result of combining the values in this object with the given annotation.


augment

public Lint augment(List<Attribute.Compound> attrs)
Returns the result of combining the values in this object with the given annotations.


augment

public Lint augment(List<Attribute.Compound> attrs,
                    long flags)
Returns the result of combining the values in this object with the given annotations and flags.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isEnabled

public boolean isEnabled(Lint.LintCategory lc)
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

public boolean isSuppressed(Lint.LintCategory lc)
Checks is a warning category has been specifically suppressed, by means of the SuppressWarnings annotation, or, in the case of the deprecated category, whether it has been implicitly suppressed by virtue of the current entity being itself deprecated.