code: private static Method findSetMethod(Class<? extends Bean> beanType, String setterName, Class<?> fieldType) {
          try {
              return beanType.getDeclaredMethod(setterName, fieldType);
          } catch (NoSuchMethodException ex) {
              Method[] methods = beanType.getMethods();
              List<Method> potential = new ArrayList<>();
              for (Method method : methods) {
                  if (method.getName().equals(setterName) && method.getParameterTypes().length == 1) {
                      potential.add(method);
                  }
              }
              if (potential.size() == 1) {
                  return potential.get(0);
              }
              for (Method method : potential) {
                  if (method.getParameterTypes()[0].equals(fieldType)) {
                      return method;
                  }
              }
              return null;
          }
      }
docs: finds a method on class or public method on super-type