code: public static TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod o, TypeQualifierValue<?> typeQualifierValue) {
          assert !o.isStatic();
  
          ReturnTypeAnnotationAccumulator accumulator = new ReturnTypeAnnotationAccumulator(typeQualifierValue, o);
          try {
              AnalysisContext.currentAnalysisContext().getSubtypes2().traverseSupertypesDepthFirst(o.getClassDescriptor(), accumulator);
              TypeQualifierAnnotation result = accumulator.getResult().getEffectiveTypeQualifierAnnotation();
              if (result == null && accumulator.overrides()) {
                  return TypeQualifierAnnotation.OVERRIDES_BUT_NO_ANNOTATION;
              }
              return result;
          } catch (ClassNotFoundException e) {
              AnalysisContext.currentAnalysisContext().getLookupFailureCallback().reportMissingClass(e);
              return null;
          }
      }
docs: Get the effective inherited TypeQualifierAnnotation on given instance
  method.
  
  @param o
  an XMethod
  @param typeQualifierValue
  the kind of TypeQualifierValue we are looking for
  @return effective TypeQualifierAnnotation inherited from overridden
  supertype methods, or null if there is no inherited
  TypeQualifierAnnotation