Example usage for Java java.lang.invoke MethodHandle fields, constructors, methods, implement or subclass
The text is from its open source code.
MethodHandle | asType(MethodType newType) Produces an adapter method handle which adapts the type of the current method handle to a new type. |
MethodHandle | bindTo(Object x) Binds a value x to the first argument of a method handle, without invoking it. |
Object | invoke(Object... args) Invokes the method handle, allowing any caller type descriptor, and optionally performing conversions on arguments and return values. |
Object | invokeExact(Object... args) Invokes the method handle, allowing any caller type descriptor, but requiring an exact type match. |
Object | invokeWithArguments(Object... arguments) Performs a variable arity invocation, passing the arguments in the given array to the method handle, as if via an inexact #invoke invoke from a call site which mentions only the type Object , and whose actual argument count is the length of the argument array. |
Object | invokeWithArguments(java.util.List> arguments) Performs a variable arity invocation, passing the arguments in the given list to the method handle, as if via an inexact #invoke invoke from a call site which mentions only the type Object , and whose actual argument count is the length of the argument list. |