Class AbstractQualifier
java.lang.Object
org.checkerframework.framework.util.typeinference8.types.AbstractQualifier
- Direct Known Subclasses:
Qualifier
,QualifierVar
This is the super class for a qualifier,
Qualifier
or a qualifier variable, QualifierVar
. A Qualifier
is a wrapper around AnnotationMirror
. A
QualifierVar
is a variable for a polymorphic qualifier that needs to be viewpoint adapted at a
call site.-
Field Summary
Modifier and TypeFieldDescriptionprotected final Java8InferenceContext
The context.The (interned) name of the top qualifier in the same hierarchy as the qualifier. -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<AbstractQualifier>
create
(Set<AnnotationMirror> annos, AnnotationMirrorMap<QualifierVar> qualifierVars, Java8InferenceContext context) Creates anAbstractQualifier
for eachAnnotationMirror
inannos
.static Set<AnnotationMirror>
glb
(Set<AbstractQualifier> quals, Java8InferenceContext context) Returns the greatest lower bounds ofquals
.static Set<AnnotationMirror>
lub
(Set<AbstractQualifier> quals, Java8InferenceContext context) Returns the least upper bounds ofquals
.boolean
sameHierarchy
(AbstractQualifier other) Returns whetherother
is in the same hierarchy as this.
-
Field Details
-
hierarchyName
The (interned) name of the top qualifier in the same hierarchy as the qualifier. -
context
The context.
-
-
Method Details
-
sameHierarchy
Returns whetherother
is in the same hierarchy as this.- Parameters:
other
- another abstract qualifier- Returns:
- whether
other
is in the same hierarchy as this.
-
lub
public static Set<AnnotationMirror> lub(Set<AbstractQualifier> quals, Java8InferenceContext context) Returns the least upper bounds ofquals
.- Parameters:
quals
- a set of qualifiers; can contain multiple qualifiers for multiple hierarchies and multiple qualifiers for a hierarchycontext
- a context- Returns:
- the least upper bounds of
quals
-
glb
public static Set<AnnotationMirror> glb(Set<AbstractQualifier> quals, Java8InferenceContext context) Returns the greatest lower bounds ofquals
.- Parameters:
quals
- a set of qualifiers; can contain multiple qualifiers for multiple hierarchies and multiple qualifiers for a hierarchycontext
- a context- Returns:
- the greatest lowest bounds of
quals
-
create
public static Set<AbstractQualifier> create(Set<AnnotationMirror> annos, AnnotationMirrorMap<QualifierVar> qualifierVars, Java8InferenceContext context) Creates anAbstractQualifier
for eachAnnotationMirror
inannos
. If an annotation mirror is a polymorphic qualifier inqualifierVars
, theQualifierVar
it maps to inqualifierVars
is added to the returned set. Otherwise, a newQualifier
is added.- Parameters:
annos
- a set of annotation mirrorsqualifierVars
- a map from polymorphic qualifiers toQualifierVar
context
- a context- Returns:
- a set containing an
AbstractQualifier
for each annotation inqualifierVars
-