code: private static boolean containsMethod(Method method, List<Method> methods) {
      if(methods != null) {
        for(Method aMethod : methods){
          if(method.getName().equals(aMethod.getName())) {
            return true;
          }
        }
      }
      return false;
    }
docs: Checks if the passed in method already exists in the list of methods. Checks for equality by the name of the method.
  @param method
  @param methods
  @return