in src/main/java/com/amazon/checkerframework/checker/data_classification/DataClassificationAnnotatedTypeFactory.java [145:171]
public boolean isSubtype(final AnnotationMirror subType, final AnnotationMirror superType) {
// Rules:
// 1. if the superType is top, always return true
// 2. if both arguments are poly with args, return true iff the argument is equal
// 3. if the superType is poly with args, return false if the subType is poly, and
// otherwise
// treat the poly with args as a regular poly qual
// 4. and vice-versa for the subType
// 5. everything else use the standard rules
if (isPolyWithArgs(superType) && isPolyWithArgs(subType)) {
return AnnotationUtils.areSame(subType, superType);
} else if (isPolyWithArgs(superType)) {
if (AnnotationUtils.areSame(subType, poly)) {
return false;
} else {
return super.isSubtype(subType, poly);
}
} else if (isPolyWithArgs(subType)) {
if (AnnotationUtils.areSame(superType, poly)) {
return false;
} else {
return super.isSubtype(poly, superType);
}
} else {
return super.isSubtype(subType, superType);
}
}