Class FastMethodHandleProxies

java.lang.Object
io.airlift.bytecode.FastMethodHandleProxies

public final class FastMethodHandleProxies extends Object
  • Method Details

    • asInterfaceInstance

      public static <T> T asInterfaceInstance(Class<T> type, MethodHandle target)
      Type Parameters:
      T - the desired type of the wrapper, a single-method interface
      Parameters:
      type - a class object representing T
      target - the method handle to invoke from the wrapper
      Returns:
      a correctly-typed wrapper for the given target
    • asInterfaceInstance

      public static <T> T asInterfaceInstance(String className, Class<T> type, MethodHandle target)
      Type Parameters:
      T - the desired type of the wrapper, a single-method interface
      Parameters:
      className - the name of the generated class
      type - a class object representing T
      target - the method handle to invoke from the wrapper
      Returns:
      a correctly-typed wrapper for the given target