protected final class UpperBoundAnnotatedTypeFactory.UpperBoundQualifierHierarchy extends MultiGraphQualifierHierarchy
MultiGraphQualifierHierarchy.MultiGraphFactory
bottoms, polymorphicQualifier, polyQualifiers, supertypesGraph, supertypesMap, tops, typeQualifiers
Constructor and Description |
---|
UpperBoundQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory factory) |
Modifier and Type | Method and Description |
---|---|
AnnotationMirror |
greatestLowerBound(AnnotationMirror a1,
AnnotationMirror a2)
Returns the greatest lower bound for the qualifiers a1 and a2.
|
boolean |
isSubtype(AnnotationMirror rhs,
AnnotationMirror lhs)
Computes subtyping as per the subtyping in the qualifier hierarchy structure unless both
annotations are the same.
|
AnnotationMirror |
leastUpperBound(AnnotationMirror a1,
AnnotationMirror a2)
Determines the least upper bound of a1 and a2.
|
addPolyRelations, buildFullMap, findBottoms, findLub, findTops, finish, getBottomAnnotation, getBottomAnnotations, getPolymorphicAnnotation, getTopAnnotation, getTopAnnotations, getTypeQualifiers, greatestLowerBoundTypeVariable, isSubtype, isSubtypeTypeVariable, isSubtypeTypeVariable, leastUpperBoundTypeVariable, toString
canHaveEmptyAnnotationSet, findAnnotationInHierarchy, findAnnotationInSameHierarchy, findCorrespondingAnnotation, getAnnotationInHierarchy, getWidth, greatestLowerBound, greatestLowerBounds, greatestLowerBounds, greatestLowerBoundsTypeVariable, isSubtype, isSubtype, isValid, leastUpperBound, leastUpperBounds, leastUpperBounds, leastUpperBoundsTypeVariable, replacePolyAll, updateMappingToMutableSet
public UpperBoundQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory factory)
factory
- MultiGraphFactory to use to construct thispublic AnnotationMirror greatestLowerBound(AnnotationMirror a1, AnnotationMirror a2)
QualifierHierarchy
The two qualifiers have to be from the same qualifier hierarchy. Otherwise, null will be returned.
greatestLowerBound
in class MultiGraphQualifierHierarchy
a1
- first annotationa2
- second annotationpublic AnnotationMirror leastUpperBound(AnnotationMirror a1, AnnotationMirror a2)
leastUpperBound
in class MultiGraphQualifierHierarchy
public boolean isSubtype(AnnotationMirror rhs, AnnotationMirror lhs)
isSubtype
in class MultiGraphQualifierHierarchy
rhs
- the right-hand side, i.e. the sub qualifierlhs
- the left-hand side, i.e. the super qualifier