public abstract class QualifierParameterTypeFactory<Q> extends DefaultQualifiedTypeFactory<QualParams<Q>>
CombiningOperation
), wildcards, typechecking
support for all of the above, substitution for accessing fields whose types
refer to qualifier parameters, and qualifier inference for method qualifier
parameters.Constructor and Description |
---|
QualifierParameterTypeFactory(QualifierContext<QualParams<Q>> context) |
computeQualifiedTypeParameterBounds, constructorFromUse, createFlowAnalysis, createQualifiedTypes, createTypeHierarchy, createTypeVariableSubstitutor, getContext, getDeclAnnotations, getDecoratedElement, getPath, getQualifiedType, getQualifiedType, getQualifiedTypeFromTypeTree, getQualifiedTypeParameterBounds, getQualifiedTypes, getQualifierHierarchy, getReceiverType, getTypeHierarchy, methodFromUse
public QualifierParameterTypeFactory(QualifierContext<QualParams<Q>> context)
protected abstract QualifierParameterAnnotationConverter<Q> createAnnotationConverter()
DefaultQualifiedTypeFactory
AnnotationConverter
for the current type system.
Every checker must override this method to return an appropriate AnnotationConverter
subclass for that checker.createAnnotationConverter
in class DefaultQualifiedTypeFactory<QualParams<Q>>
public QualifierParameterAnnotationConverter<Q> getAnnotationConverter()
DefaultQualifiedTypeFactory
AnnotationConverter
for the current type system.getAnnotationConverter
in class DefaultQualifiedTypeFactory<QualParams<Q>>
protected abstract QualifierHierarchy<Q> createGroundQualifierHierarchy()
QualifierHierarchy
for ground qualifiers (represented
by instances of Q
).public QualifierHierarchy<Q> getGroundQualifierHierarchy()
protected QualifierHierarchy<QualParams<Q>> createQualifierHierarchy()
DefaultQualifiedTypeFactory
QualifierHierarchy
for the current type system.
Every checker must override this method to return an appropriate QualifierHierarchy
subclass for that checker.createQualifierHierarchy
in class DefaultQualifiedTypeFactory<QualParams<Q>>
protected QualifierParameterTypeAnnotator<Q> createTypeAnnotator()
DefaultQualifiedTypeFactory
TypeAnnotator
to be used by this type factory.
Checkers that need custom TypeAnnotator
behavior should
override this method to return an instance of their custom TypeAnnotator
subclass.createTypeAnnotator
in class DefaultQualifiedTypeFactory<QualParams<Q>>
protected QualifierParameterTreeAnnotator<Q> createTreeAnnotator()
DefaultQualifiedTypeFactory
TreeAnnotator
to be used by this type factory.
Checkers that need custom TreeAnnotator
behavior should
override this method to return an instance of their custom TreeAnnotator
subclass.createTreeAnnotator
in class DefaultQualifiedTypeFactory<QualParams<Q>>
public QualifiedTypeMirror<QualParams<Q>> postAsMemberOf(QualifiedTypeMirror<QualParams<Q>> memberType, QualifiedTypeMirror<QualParams<Q>> receiverType, Element memberElement)
QualifiedTypeFactory
asMemberOf
.postAsMemberOf
in interface QualifiedTypeFactory<QualParams<Q>>
postAsMemberOf
in class DefaultQualifiedTypeFactory<QualParams<Q>>
memberType
- the type of the element being accessed, according to the default
asMemberOf
implementationreceiverType
- the type of the object instance whose element is being accessedmemberElement
- the element being accessedmemberType
after applying checker-specific
adjustmentspublic Pair<QualifiedTypeMirror.QualifiedExecutableType<QualParams<Q>>,List<QualifiedTypeMirror<QualParams<Q>>>> methodFromUse(ExpressionTree tree, ExecutableElement methodElt, QualifiedTypeMirror<QualParams<Q>> receiverType)
methodFromUse
in interface QualifiedTypeFactory<QualParams<Q>>
methodFromUse
in class DefaultQualifiedTypeFactory<QualParams<Q>>
QualifiedTypeFactory.methodFromUse(MethodInvocationTree)
public List<QualifiedTypeMirror<QualParams<Q>>> postDirectSuperTypes(QualifiedTypeMirror<QualParams<Q>> subtype, List<? extends QualifiedTypeMirror<QualParams<Q>>> supertypes)
QualifiedTypeFactory
directSuperTypes
.postDirectSuperTypes
in interface QualifiedTypeFactory<QualParams<Q>>
postDirectSuperTypes
in class DefaultQualifiedTypeFactory<QualParams<Q>>
subtype
- the target of the directSuperTypes
callsupertypes
- the supertypes produced by the default
directSuperTypes
implementationsupertypes
after applying checker-specific
adjustments