@Override
    public List<MethodMetadata> parseAndValidateMetadata(Class<?> targetType) {
      checkState(
          targetType.getTypeParameters().length == 0,
          "Parameterized types unsupported: %s",
          targetType.getSimpleName());
      checkState(
          targetType.getInterfaces().length <= 1,
          "Only single inheritance supported: %s",
          targetType.getSimpleName());
      final Map<String, MethodMetadata> result = new LinkedHashMap<String, MethodMetadata>();
      for (final Method method : targetType.getMethods()) {
        if (method.getDeclaringClass() == Object.class
            || (method.getModifiers() & Modifier.STATIC) != 0
            || Util.isDefault(method)
            || method.isAnnotationPresent(FeignIgnore.class)) {
          continue;
        }
        final MethodMetadata metadata = parseAndValidateMetadata(targetType, method);
        if (result.containsKey(metadata.configKey())) {
          MethodMetadata existingMetadata = result.get(metadata.configKey());
          Type existingReturnType = existingMetadata.returnType();
          Type overridingReturnType = metadata.returnType();
          Type resolvedType = Types.resolveReturnType(existingReturnType, overridingReturnType);
          if (resolvedType.equals(overridingReturnType)) {
            result.put(metadata.configKey(), metadata);
          }
          continue;
        }
        result.put(metadata.configKey(), metadata);
      }
      return new ArrayList<>(result.values());
    }
@param targetType {@link feign.Target#type() type} of the Feign interface.
@see #parseAndValidateMetadata(Class)
core/src/main/java/feign/Contract.java