/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* A class for handling -Xlint suboptions and @SuppresssWarnings.
*
* <p><b>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.</b>
*/
public class Lint
{
/** The context key for the root Lint object. */
/** Get the root Lint instance. */
return instance;
}
/**
* Returns the result of combining the values in this object with
* the given annotation.
*/
}
/**
* Returns the result of combining the values in this object with
* the given annotations.
*/
}
/**
* Returns the result of combining the values in this object with
* the given annotations and flags.
*/
if (l == this)
l = new Lint(this);
}
return l;
}
// initialize values according to the lint options
}
}
}
}
/**
* Categories of warnings that can be generated by the compiler.
*/
public enum LintCategory {
/**
* Warn about use of unnecessary casts.
*/
/**
* Warn about issues related to classfile contents
*/
/**
* Warn about use of deprecated items.
*/
/**
* Warn about items which are documented with an {@code @deprecated} JavaDoc
* comment, but which do not have {@code @Deprecated} annotation.
*/
/**
* Warn about division by constant integer 0.
*/
/**
* Warn about empty statement after if.
*/
/**
* Warn about falling through from one case of a switch statement to the next.
*/
/**
* Warn about finally clauses that do not terminate normally.
*/
/**
* Warn about issues relating to use of command line options
*/
/**
* Warn about issues regarding method overrides.
*/
/**
* Warn about invalid path elements on the command line.
* Such warnings cannot be suppressed with the SuppressWarnings
* annotation.
*/
/**
* Warn about issues regarding annotation processing.
*/
/**
* Warn about unchecked operations on raw types.
*/
/**
* Warn about Serializable classes that do not provide a serial version ID.
*/
/**
* Warn about issues relating to use of statics
*/
/**
* Warn about proprietary API that may be removed in a future release.
*/
/**
* Warn about issues relating to use of try blocks (i.e. try-with-resources)
*/
/**
* Warn about unchecked operations on raw types.
*/
/**
* Warn about potentially unsafe vararg methods
*/
this(option, false);
}
}
}
public final boolean hidden;
};
/**
* 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.
*/
}
/**
* 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.
*/
}
// to break an ugly sequence of initialization dependencies,
// we defer the initialization of syms until it is needed
}
initSyms();
}
initSyms();
a.accept(this);
}
}
private void initSyms() {
}
}
}
}
}
// If we find a @SuppressWarnings annotation, then we continue
// walking the tree, in order to suppress the individual warnings
// specified in the @SuppressWarnings annotation.
}
}
}
}
}
}
};
}