private static void removeAllCovariantMethods(final List<Method> actualMethods, final Method method, final Map<Method, Method> covariantMethods) {
    if ((method.getModifiers() & Constants.ACC_SYNTHETIC) != 0) {
      return;
    }

    for (Iterator<Method> it = actualMethods.iterator(); it.hasNext();) {
      Method actualMethod = it.next();
      if (actualMethod.equals(method)) {
        continue;
      }

      if (!actualMethod.getName().equals(method.getName()) ||
          !Arrays.equals(actualMethod.getParameterTypes(), method.getParameterTypes())) {
        continue;
      }

      if (ReflectionUtil.isAssignable(actualMethod.getReturnType(), method.getReturnType())) {
        if ((actualMethod.getModifiers() & Constants.ACC_ABSTRACT) != 0 || (actualMethod.getModifiers() & Constants.ACC_SYNTHETIC) != 0) {
          covariantMethods.put(actualMethod, method); //generate bridge
        }
        else {
          it.remove();
        }
      }
    }
  }
private static void removeAllCovariantMethods(final List<Method> actualMethods, final Method method, final Map<Method, Method> covariantMethods)