public class PolyQualHierarchy<Q> extends Object implements QualifierHierarchy<PolyQual<Q>>
PolyQual
instances. This class extends
the underlying subtyping hierarchy with qualifier variables, which are
handled like Java type variables (JLS 4.10.2 - a type variable is a subtype
of its upper bound and a supertype of its lower bound).Constructor and Description |
---|
PolyQualHierarchy(QualifierHierarchy<Q> groundHierarchy) |
Modifier and Type | Method and Description |
---|---|
PolyQual<Q> |
getBottom()
Gets the bottom annotation of the hierarchy.
|
PolyQual<Q> |
getTop()
Gets the top annotation of the hierarchy.
|
PolyQual<Q> |
greatestLowerBound(PolyQual<Q> a,
PolyQual<Q> b)
Gets the greatest lower bound of two qualifiers.
|
boolean |
isSubtype(PolyQual<Q> subtype,
PolyQual<Q> supertype)
Checks if
subtype is a subtype of supertype . |
PolyQual<Q> |
leastUpperBound(PolyQual<Q> a,
PolyQual<Q> b)
Gets the least upper bound of two qualifiers.
|
public PolyQualHierarchy(QualifierHierarchy<Q> groundHierarchy)
public boolean isSubtype(PolyQual<Q> subtype, PolyQual<Q> supertype)
QualifierHierarchy
subtype
is a subtype of supertype
.isSubtype
in interface QualifierHierarchy<PolyQual<Q>>
public PolyQual<Q> leastUpperBound(PolyQual<Q> a, PolyQual<Q> b)
QualifierHierarchy
leastUpperBound
in interface QualifierHierarchy<PolyQual<Q>>
public PolyQual<Q> greatestLowerBound(PolyQual<Q> a, PolyQual<Q> b)
QualifierHierarchy
greatestLowerBound
in interface QualifierHierarchy<PolyQual<Q>>
public PolyQual<Q> getTop()
QualifierHierarchy
getTop
in interface QualifierHierarchy<PolyQual<Q>>
public PolyQual<Q> getBottom()
QualifierHierarchy
getBottom
in interface QualifierHierarchy<PolyQual<Q>>