protected final class UpperBoundAnnotatedTypeFactory.UpperBoundQualifierHierarchy extends MultiGraphQualifierHierarchy
MultiGraphQualifierHierarchy.MultiGraphFactory
bottoms, polyQualifiers, supertypesDirect, supertypesTransitive, tops
Constructor and Description |
---|
UpperBoundQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory factory)
Create an UpperBoundQualifierHierarchy.
|
Modifier and Type | Method and Description |
---|---|
AnnotationMirror |
greatestLowerBound(AnnotationMirror a1,
AnnotationMirror a2)
Returns the greatest lower bound for the qualifiers qualifier1 and qualifier2.
|
boolean |
isSubtype(AnnotationMirror subAnno,
AnnotationMirror superAnno)
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.
|
int |
numberOfIterationsBeforeWidening()
Returns the number of iterations dataflow should perform before
QualifierHierarchy.widenedUpperBound(AnnotationMirror, AnnotationMirror) is called or -1 if it should never be
called. |
AnnotationMirror |
widenedUpperBound(AnnotationMirror newQualifier,
AnnotationMirror previousQualifier)
If the qualifier hierarchy has an infinite ascending chain, then the dataflow analysis might
never reach a fixed point.
|
addPolyRelations, findBottoms, findLub, findTops, finish, getBottomAnnotation, getBottomAnnotations, getPolymorphicAnnotation, getTopAnnotation, getTopAnnotations, isPolymorphicQualifier, isSubtype, isValid, toString, transitiveClosure
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
assertSameSize, assertSameSize, canHaveEmptyAnnotationSet, findAnnotationInHierarchy, findAnnotationInSameHierarchy, getWidth, greatestLowerBound, greatestLowerBounds, greatestLowerBounds, greatestLowerBoundsTypeVariable, greatestLowerBoundTypeVariable, isSubtype, isSubtype, isSubtypeTypeVariable, isSubtypeTypeVariable, leastUpperBound, leastUpperBounds, leastUpperBounds, leastUpperBoundsTypeVariable, leastUpperBoundTypeVariable, updateMappingToMutableSet
public UpperBoundQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory factory)
factory
- the MultiGraphFactory to use to construct thispublic AnnotationMirror greatestLowerBound(AnnotationMirror a1, AnnotationMirror a2)
QualifierHierarchy
greatestLowerBound
in interface QualifierHierarchy
greatestLowerBound
in class MultiGraphQualifierHierarchy
a1
- first qualifiera2
- second qualifierpublic AnnotationMirror leastUpperBound(AnnotationMirror a1, AnnotationMirror a2)
leastUpperBound
in interface QualifierHierarchy
leastUpperBound
in class MultiGraphQualifierHierarchy
a1
- the first qualifier; may not be in the same hierarchy as qualifier2
a2
- the second qualifier; may not be in the same hierarchy as qualifier1
public AnnotationMirror widenedUpperBound(AnnotationMirror newQualifier, AnnotationMirror previousQualifier)
QualifierHierarchy
QualifierHierarchy.numberOfIterationsBeforeWidening()
to
return a positive number.
newQualifier
is newest qualifier dataflow computed for some expression and previousQualifier
is the qualifier dataflow computed on the last iteration.
If the qualifier hierarchy has no infinite ascending chain, returns the least upper bound of the two annotations.
newQualifier
- new qualifier dataflow computed for some expression; must be in the same
hierarchy as previousQualifier
previousQualifier
- the previous qualifier dataflow computed on the last iteration; must
be in the same hierarchy as previousQualifier
public int numberOfIterationsBeforeWidening()
QualifierHierarchy
QualifierHierarchy.widenedUpperBound(AnnotationMirror, AnnotationMirror)
is called or -1 if it should never be
called.QualifierHierarchy.widenedUpperBound(AnnotationMirror, AnnotationMirror)
is called or -1 if it should
never be called.public boolean isSubtype(AnnotationMirror subAnno, AnnotationMirror superAnno)
isSubtype
in interface QualifierHierarchy
isSubtype
in class MultiGraphQualifierHierarchy
subAnno
- the sub qualifiersuperAnno
- the super qualifier