Class BaseTypeValidator

java.lang.Object
org.checkerframework.framework.type.visitor.AnnotatedTypeScanner<Void,Tree>
org.checkerframework.common.basetype.BaseTypeValidator
All Implemented Interfaces:
TypeValidator, AnnotatedTypeVisitor<Void,Tree>
Direct Known Subclasses:
ReportVisitor.ReportTypeValidator

public class BaseTypeValidator extends AnnotatedTypeScanner<Void,Tree> implements TypeValidator
A visitor to validate the types in a tree.

Note: A TypeValidator (this class and its subclasses) cannot tell whether an annotation was written by a programmer or defaulted/inferred/computed by the Checker Framework, because the AnnotatedTypeMirror does not make distinctions about which annotations in an AnnotatedTypeMirror were explicitly written and which were added by a checker. To issue a warning/error only when a programmer writes an annotation, override BaseTypeVisitor.visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree, java.lang.Void) and BaseTypeVisitor.visitVariable(com.sun.source.tree.VariableTree, java.lang.Void).