Class DefaultInferredTypesApplier
java.lang.Object
org.checkerframework.framework.type.DefaultInferredTypesApplier
Utility class for applying the annotations inferred by dataflow to a given type.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInferredTypesApplier(boolean omitSubtypingCheck, QualifierHierarchy hierarchy, AnnotatedTypeFactory atypeFactory) Creates an applier.DefaultInferredTypesApplier(QualifierHierarchy hierarchy, AnnotatedTypeFactory atypeFactory) Creates an applier that applies an inferred qualifier only if it is a subtype of the qualifier it replaces. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyInferredType(AnnotatedTypeMirror type, AnnotationMirrorSet inferredSet, TypeMirror inferredTypeMirror) For each top in qualifier hierarchy, traverse inferred and copy the required annotations over to type.
-
Constructor Details
-
DefaultInferredTypesApplier
Creates an applier that applies an inferred qualifier only if it is a subtype of the qualifier it replaces.- Parameters:
hierarchy- the qualifier hierarchy ofatypeFactoryatypeFactory- the type factory that uses this applier
-
DefaultInferredTypesApplier
public DefaultInferredTypesApplier(boolean omitSubtypingCheck, QualifierHierarchy hierarchy, AnnotatedTypeFactory atypeFactory) Creates an applier.- Parameters:
omitSubtypingCheck- whether to apply an inferred qualifier even if it is not a subtype of the qualifier it replaceshierarchy- the qualifier hierarchy ofatypeFactoryatypeFactory- the type factory that uses this applier
-
-
Method Details
-
applyInferredType
public void applyInferredType(AnnotatedTypeMirror type, AnnotationMirrorSet inferredSet, TypeMirror inferredTypeMirror) For each top in qualifier hierarchy, traverse inferred and copy the required annotations over to type.- Parameters:
type- the type to which annotations are being appliedinferredSet- the type inferred by data flowinferredTypeMirror- underlying inferred type
-