Package org.checkerframework.framework.type
package org.checkerframework.framework.type
Contains a way of representing the type of a program element that considers the type qualifiers
on that element (and ignores its Java type). The package additionally provides utilities for
obtaining and manipulating this type representation.
- See the Checker Framework Manual:
- How to write a checker plugin
-
ClassDescriptionAnnotatedTypeCopier is a visitor that deep copies an AnnotatedTypeMirror exactly, including any lazily initialized fields.Duplicates annotated types and replaces components according to a replacement map.AnnotatedTypeCopier maintains a mapping of typeVisited => copyOfTypeVisited When a reference, typeVisited, is encountered again, it will use the recorded reference, copyOfTypeVisited, instead of generating a new copy of typeVisited.The methods of this class take an element or AST node, and return the annotated type as an
AnnotatedTypeMirror
.The type for an instantiated generic method or constructor.Converts an AnnotatedTypeMirror mirror into a formatted string.Represents an annotated type in the Java programming language, including: standard types: primitive types, declared types (class and interface types), array types, type variables, and the null type wildcard type argumentsexecutable types
(their signature and return types)pseudo-types
corresponding to packages and to the keywordvoid
Represents Array types in java.Represents a declared type (whether class or interface).Represents a type of an executable.Represents an intersection type.A pseudo-type used where no actual type is appropriate.Represents the null type.Represents a primitive type.Represents a type variable.Represents a wildcard type argument.Represents upper and lower bounds, each an AnnotatedTypeMirror.Replaces or adds all the annotations in the parameter with the annotations from the visited type.This class assists theAnnotatedTypeFactory
by reflectively looking up the list of annotation class names in each checker's qual directory, and then loading and returning it as a set of annotation classes.BoundsInitializer creates AnnotatedTypeMirrors (without annotations) for the bounds of type variables and wildcards.A helper class that puts the declaration annotations from a method declaration back into the corresponding Elements, so that they get stored in the bytecode by the compiler.An AnnotatedTypeFormatter used by default by all AnnotatedTypeFactory (and therefore all annotated types).A scanning visitor that prints the entire AnnotatedTypeMirror passed to visit.Utility class for applying the annotations inferred by dataflow to a given type.Default implementation of TypeHierarchy that implements the JLS specification with minor deviations as outlined by the Checker Framework manual.Utility methods for adding the annotations that are stored in an Element to the type that represents that element (or a use of that Element).AQualifierHierarchy
where qualifiers may be represented by annotations with elements.Compares two annotated type mirrors for structural equality using only the primary annotations and underlying types of the two input types and their component types.GenericAnnotatedTypeFactory<Value extends CFAbstractValue<Value>,Store extends CFAbstractStore<Value, Store>, TransferFunction extends CFAbstractTransfer<Value, Store, TransferFunction>, FlowAnalysis extends CFAbstractAnalysis<Value, Store, TransferFunction>> A factory that extendsAnnotatedTypeFactory
to optionally use flow-sensitive qualifier inference.Track the state of org.checkerframework.dataflow analysis scanning for each class tree in the compilation unit.Computes the hashcode of an AnnotatedTypeMirror using the underlying type and primary annotations and the hash code of component types of AnnotatedTypeMirror.AQualifierHierarchy
where qualifiers may be represented by annotations with elements, but most of the qualifiers do not have elements.AQualifierHierarchy
where no qualifier has arguments; that is, no qualifier is represented by an annotation with elements.Represents multiple type qualifier hierarchies.Class that computes and stores the qualifier upper bounds for type uses.A visitor used to compare two type mirrors for "structural" equality.Stores the result ofStructuralEqualityComparer
for type arguments.AQualifierHierarchy
where, when a qualifier has arguments, the subtype relation is determined by a subset test on the elements (arguments).AQualifierHierarchy
where, when a qualifier has arguments, the subtype relation is determined by a superset test on the elements (arguments).THIS CLASS IS DESIGNED FOR USE WITH DefaultTypeHierarchy, DefaultRawnessComparer, and StructuralEqualityComparer ONLY.SyntheticArrays exists solely to fix AnnotatedTypeMirrors that need to be adapted from Array type to a specific kind of array.Compares AnnotatedTypeMirrors for subtype relationships.A helper class that puts the annotations from an AnnotatedTypeMirrors back into the corresponding Elements, so that they get stored in the bytecode by the compiler.TypeVariableSusbtitutor replaces type variables from a declaration with arguments to its use.