Package io.airlift.bytecode
Class FastMethodHandleProxies
- java.lang.Object
-
- io.airlift.bytecode.FastMethodHandleProxies
-
public final class FastMethodHandleProxies extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFastMethodHandleProxies.Bootstrap
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TasInterfaceInstance(Class<T> type, MethodHandle target)Faster version ofMethodHandleProxies.asInterfaceInstance(Class, MethodHandle).static <T> TasInterfaceInstance(String className, Class<T> type, MethodHandle target)Faster version ofMethodHandleProxies.asInterfaceInstance(Class, MethodHandle).
-
-
-
Method Detail
-
asInterfaceInstance
public static <T> T asInterfaceInstance(Class<T> type, MethodHandle target)
Faster version ofMethodHandleProxies.asInterfaceInstance(Class, MethodHandle).- Type Parameters:
T- the desired type of the wrapper, a single-method interface- Parameters:
type- a class object representingTtarget- 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)
Faster version ofMethodHandleProxies.asInterfaceInstance(Class, MethodHandle).- Type Parameters:
T- the desired type of the wrapper, a single-method interface- Parameters:
className- the name of the generated classtype- a class object representingTtarget- the method handle to invoke from the wrapper- Returns:
- a correctly-typed wrapper for the given target
-
-