protected abstract class InitializationAnnotatedTypeFactory.InitializationQualifierHierarchy extends MultiGraphQualifierHierarchy
QualifierHierarchy
for the initialization type system. Type systems extending the
Initialization Checker should call methods isSubtypeInitialization(AnnotationMirror, AnnotationMirror)
and leastUpperBoundInitialization(AnnotationMirror,
AnnotationMirror)
for appropriate qualifiers. See protected subclass
NullnessQualifierHierarchy within class AbstractNullnessChecker
for an example.MultiGraphQualifierHierarchy.MultiGraphFactory
bottoms, polymorphicQualifier, polyQualifiers, supertypesGraph, supertypesMap, tops
Constructor and Description |
---|
InitializationQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory f,
Object... arg) |
Modifier and Type | Method and Description |
---|---|
AnnotationMirror |
greatestLowerBound(AnnotationMirror anno1,
AnnotationMirror anno2)
Returns the greatest lower bound for the qualifiers a1 and a2.
|
boolean |
isSubtypeInitialization(AnnotationMirror rhs,
AnnotationMirror lhs)
Subtype testing for initialization annotations.
|
protected AnnotationMirror |
leastUpperBoundInitialization(AnnotationMirror anno1,
AnnotationMirror anno2)
Compute the least upper bound of two initialization qualifiers.
|
protected TypeMirror |
lubTypeFrame(TypeMirror a,
TypeMirror b)
Returns the least upper bound of two types.
|
addPolyRelations, buildFullMap, findBottoms, findLub, findTops, finish, getBottomAnnotation, getBottomAnnotations, getPolymorphicAnnotation, getTopAnnotation, getTopAnnotations, getTypeQualifiers, greatestLowerBoundTypeVariable, isSubtype, isSubtype, isSubtypeTypeVariable, isSubtypeTypeVariable, leastUpperBound, leastUpperBoundTypeVariable, toString
canHaveEmptyAnnotationSet, findAnnotationInHierarchy, findAnnotationInSameHierarchy, findCorrespondingAnnotation, getAnnotationInHierarchy, getWidth, greatestLowerBound, greatestLowerBounds, greatestLowerBounds, greatestLowerBoundsTypeVariable, implementsWidening, isSubtype, isSubtype, isValid, leastUpperBound, leastUpperBounds, leastUpperBounds, leastUpperBoundsTypeVariable, replacePolyAll, updateMappingToMutableSet, widenUpperBound
public InitializationQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory f, Object... arg)
public boolean isSubtypeInitialization(AnnotationMirror rhs, AnnotationMirror lhs)
protected AnnotationMirror leastUpperBoundInitialization(AnnotationMirror anno1, AnnotationMirror anno2)
anno1
- an initialization qualifieranno2
- an initialization qualifierprotected TypeMirror lubTypeFrame(TypeMirror a, TypeMirror b)
public AnnotationMirror greatestLowerBound(AnnotationMirror anno1, AnnotationMirror anno2)
QualifierHierarchy
The two qualifiers have to be from the same qualifier hierarchy. Otherwise, null will be returned.
greatestLowerBound
in class MultiGraphQualifierHierarchy
anno1
- first annotationanno2
- second annotation