Package org.checkerframework.framework.source
package org.checkerframework.framework.source
Contains the essential functionality for interfacing a compile-time (source) type-checker plug-in
to the Java compiler. This allows a checker to use the compiler's error reporting mechanism and
to access abstract syntax trees and compiler utility classes.
Most classes won't want to extend the classes in this package directly; the classes in the
org.checkerframework.common.basetype package provide subtype checking functionality.
- See the Checker Framework Manual:
- Writing a Checker
-
ClassDescriptionAn abstract
SourceCheckerthat runs independent subcheckers and interleaves their messages.What to assume about whether Javaassertstatements are executed at run time.ADiagMessageis a kind, a message key, and arguments.A destination for Checker Framework diagnostics, allowing a host to intercept findings instead of having them printed through javac'sTrees.Unit tests forRelevantJavaTypesinheritance across checker class hierarchies.Base test checker with explicit relevant Java types.Checker that overrides createRelevantJavaTypes programmatically.Subclass checker adding its own relevant Java types.Subclass checker without any annotation.Test checker with no annotation and no annotated superclass.An abstract annotation processor designed for implementing a source-file checker as an annotation processor (a compiler plug-in).Represents a message (e.g., an error message) issued by a checker.SourceVisitor<R,P> An AST visitor that provides a variety of compiler utilities and interfaces to facilitate type-checking.Tests forStubFilespropagation across checker hierarchies and compound checkers.Base test checker with explicit stub files.Child subchecker with its own stub files.Checker with both declared and extra stub files.Grandparent checker with stub files.Subclass checker inheriting superclass stub files.Subclass checker overriding with its own stub files.Parent compound checker.Unannotated parent checker extending GrandparentStubChecker.A machine-applicable source edit that aSourceCheckermay attach to a finding, so a host (such as the Error Prone plugin) can offer it as a suggested fix through its own fix / patch pipeline.A single text replacement: replace the source between two offsets with new text.Unit tests forSuggestedFixData, the framework-agnostic (Error-Prone-free) representation of a machine-applicable source edit that a host can translate into its own suggested fix.An annotation used to indicate what lint options a checker supports.The values of the-Amodeoption that a checker supports.An annotation used to indicate what Checker Framework options a checker supports.Specifies the prefixes or checkernames that suppress warnings issued by this checker.Unit tests forSuppressWarningsPrefixinheritance across checker class hierarchies and propagation from parent checkers to subcheckers.Base test checker with explicit prefixes.Subclass checker adding its own prefixes.Child subchecker with its own prefix.Parent compound checker.Grandparent checker with explicit prefix.Subclass checker without any annotation.Parent checker that explicitly overrides its superclass prefix.Test checker with no annotation and no annotated superclass.Unannotated parent checker extending GrandparentPrefixChecker.