public static <I, R> Function<I, R> getOneArgStaticMethodAsFunction(Class<?> lookupClazz,
    String methodName, Class<I> argumentClazz, Class<R> returnValueClass) throws Throwable {
    MethodHandles.Lookup lookup = MethodHandles.lookup();
    MethodHandle methodHandle = lookup.findStatic(lookupClazz, methodName,
      MethodType.methodType(returnValueClass, argumentClazz));
    CallSite site =
      LambdaMetafactory.metafactory(lookup, "apply", MethodType.methodType(Function.class),
        methodHandle.type().generic(), methodHandle, methodHandle.type());

    return (Function<I, R>) site.getTarget().invokeExact();

  }
Creates a Function which can be called to performantly execute a reflected static method. The
creation of the Function itself may not be fast, but executing that method thereafter should be
much faster than {@link #invokeMethod(Object, String, Object...)}.
@param lookupClazz      the class to find the static method in
@param methodName       the method name
@param argumentClazz    the type of the argument
@param returnValueClass the type of the return value
@return a function which when called executes the requested static method.
@throws Throwable exception types from the underlying reflection
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ReflectionUtils.java