checkers.nullness
Class KeyForSubchecker
java.lang.Object
javax.annotation.processing.AbstractProcessor
com.sun.source.util.AbstractTypeProcessor
checkers.source.SourceChecker
checkers.basetype.BaseTypeChecker
checkers.nullness.KeyForSubchecker
- All Implemented Interfaces:
- Processor
@TypeQualifiers(value={KeyFor.class,Unqualified.class,KeyForBottom.class})
public class KeyForSubchecker
extends BaseTypeChecker
TODO: doc
Methods inherited from class checkers.source.SourceChecker |
fullMessageOf, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getShouldSkip, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, message, report, typeProcess |
KeyForSubchecker
public KeyForSubchecker()
createTypeHierarchy
protected TypeHierarchy createTypeHierarchy()
- Description copied from class:
BaseTypeChecker
- Creates the type subtyping checker using the current type qualifier
hierarchy.
Subclasses may override this method to specify new type checking
rules beyond the typical java subtyping rules.
- Overrides:
createTypeHierarchy
in class BaseTypeChecker
- Returns:
- the type relations class to check type subtyping
isSubtype
public final boolean isSubtype(AnnotatedTypeMirror rhs,
AnnotatedTypeMirror lhs)
- Description copied from class:
BaseTypeChecker
- Tests whether one annotated type is a subtype of another, with
respect to the annotations on these types.
Subclasses may wish to ignore annotations that are not related to the
type qualifiers they check.
This implementation follows the subtype rules specified in
TypeHierarchy
. Its behavior is undefined for any annotations
not specified by either TypeQualifiers
or the result of
BaseTypeChecker.getSupportedTypeQualifiers()
.
- Overrides:
isSubtype
in class BaseTypeChecker
- Parameters:
rhs
- the child typelhs
- the parent type
- Returns:
- true iff
sub
is a subtype of sup