code: public ResolvedType findSupertype(Class<?> erasedSupertype) {
          if (erasedSupertype == _erasedType) {
              return this;
          }
          // Check super interfaces first:
          if (erasedSupertype.isInterface()) {
              for (ResolvedType it : implInterfaces()) {
                  ResolvedType type = it.findSupertype(erasedSupertype);
                  if (type != null) {
                      return type;
                  }
              }
          }
          // and if not found, super class and its supertypes
          ResolvedType pc = parentType();
          if (pc != null) {
              ResolvedType type = pc.findSupertype(erasedSupertype);
              if (type != null) {
                  return type;
              }
          }
          // nope; doesn't look like we extend or implement super type in question
          return null;
      }
docs: Method for finding super type of this type that has specified type
  erased signature. If supertype is an interface which is implemented
  using multiple inheritance paths, preference is given to interfaces
  implemented "highest up the stack" (directly implemented interfaces
  over interfaces superclass implements).