code: public static Type getSuperType(Type subType, Class<?> rawSuperType) {
          while (subType != null && getRawClass(subType) != rawSuperType) {
              subType = getSuperType(subType);
          }
          return subType;
      }
docs: Get the super type for a type in its super type chain, which has
  a raw class that matches the specified class.
  
  @param subType the sub type to find super type for
  @param rawSuperType the raw class for the super type
  @return the super type that matches the requirement