private Function<I, ? extends R> loadFunction(String className) {
    long startTime = System.nanoTime();
    try {
      Class<?> clazz = Class.forName(className, false, classLoader);
      if (!baseClass.isAssignableFrom(clazz)) {
        LOG.debug("Requested class {} is not assignable to {}, skipping creation of function",
          className, baseClass.getName());
        return this::notFound;
      }
      return ReflectionUtils.getOneArgStaticMethodAsFunction(clazz, methodName, argClass,
        (Class<? extends R>) clazz);
    } catch (Throwable t) {
      LOG.debug("Failed to create function for {}", className, t);
      return this::notFound;
    } finally {
      LOG.debug("Populated cache for {} in {}ms", className,
        TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime));
    }
  }
Get and execute the Function for the given className, passing the argument to the function and
returning the result.
@param className the full name of the class to lookup
@param argument  the argument to pass to the function, if found.
@return null if a function is not found for classname, otherwise the result of the function.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ReflectedFunctionCache.java