docs: public static Method getSingleAbstractMethod(Class<?> baseClass) {
  
  		if (!baseClass.isInterface()) {
  			throw new InvalidTypesException("Given class: " + baseClass + "is not a FunctionalInterface.");
  		}
  
  		Method sam = null;
  		for (Method method : baseClass.getMethods()) {
  			if (Modifier.isAbstract(method.getModifiers())) {
  				if (sam == null) {
  					sam = method;
  				} else {
  					throw new InvalidTypesException("Given class: " + baseClass +
  						" is not a FunctionalInterface. It has more than one abstract method.");
  				}
  			}
  		}
  
  		if (sam == null) {
  			throw new InvalidTypesException(
  				"Given class: " + baseClass + " is not a FunctionalInterface. It does not have any abstract methods.");
  		}
  
  		return sam;
  	}