Uses of Class
java.lang.invoke.MethodHandle
-
Packages that use MethodHandle Package Description java.lang.invoke Thejava.lang.invokepackage provides low-level primitives for interacting with the Java Virtual Machine.jdk.dynalink Contains interfaces and classes that are used to link aninvokedynamiccall site.jdk.dynalink.beans Contains the linker for ordinary Java objects.jdk.dynalink.linker Contains interfaces and classes needed by language runtimes to implement their own language-specific object models and type conversions.jdk.dynalink.linker.support Contains classes that make it more convenient for language runtimes to implement their own language-specific object models and type conversions by providing basic implementations of some classes as well as various utilities. -
-
Uses of MethodHandle in java.lang.invoke
Methods in java.lang.invoke that return MethodHandle Modifier and Type Method Description static MethodHandleMethodHandles. arrayConstructor(Class<?> arrayType)Return a MethodHandle that produces an array of the requested type with the passed-in length.static MethodHandleMethodHandles. arrayElementGetter(Class<?> arrayType)Return a MethodHandle able to read from the array.static MethodHandleMethodHandles. arrayElementSetter(Class<?> arrayType)Return a MethodHandle able to write to the array.static MethodHandleMethodHandles. arrayLength(Class<?> arrayType)Return a MethodHandle that fetches the length from the passed-in array.MethodHandleMethodHandle. asCollector(int collectPosition, Class<?> arrayClass, int collectCount)Returns a MethodHandle that collects the requested incoming arguments, which must match the types in MethodType incomingArgs, into an array of arrayClass, called T.MethodHandleMethodHandle. asCollector(Class<?> arrayClass, int collectCount)Returns a MethodHandle that collects the requested incoming arguments, which must match the types in MethodType incomingArgs, into an array of arrayClass, called T.MethodHandleMethodHandle. asFixedArity()Return a fixed arity version of the current MethodHandle.MethodHandleMethodHandle. asSpreader(int spreadPosition, Class<?> arrayClass, int spreadCount)Produce a MethodHandle that has an array of type arrayClass as its argument at the specified position and replaces the array with spreadCount arguments from the array before calling the original MethodHandle.MethodHandleMethodHandle. asSpreader(Class<?> arrayClass, int spreadCount)Produce a MethodHandle that has an array of type arrayClass as its last argument and replaces the array with spreadCount arguments from the array before calling the original MethodHandle.MethodHandleMethodHandle. asType(MethodType newType)Returns a MethodHandle that presents as being of MethodType newType.MethodHandleMethodHandle. asVarargsCollector(Class<?> arrayParameter)Create an varargs collector adapter on this MethodHandle.MethodHandleMethodHandles.Lookup. bind(Object receiver, String methodName, MethodType type)Return an early-bound method handle to a non-static method.MethodHandleMethodHandle. bindTo(Object value)Bind the value as the first argument to the MethodHandlestatic MethodHandleMethodHandles. catchException(MethodHandle tryHandle, Class<? extends Throwable> throwableClass, MethodHandle catchHandle)Produce a MethodHandle that implements a try-catch block.static MethodHandleMethodHandles. collectArguments(MethodHandle target, int pos, MethodHandle filter)Produce a MethodHandle that preprocesses some of the arguments by calling the filter handle.static MethodHandleMethodHandles. constant(Class<?> returnType, Object constantValue)Create a MethodHandle that returns the constantValue on each invocation.static MethodHandleMethodHandles. countedLoop(MethodHandle loopCountHandle, MethodHandle initHandle, MethodHandle bodyHandle)Produce a loop handle that executes a given number of iterations.static MethodHandleMethodHandles. countedLoop(MethodHandle startHandle, MethodHandle endHandle, MethodHandle initHandle, MethodHandle bodyHandle)Produce a loop handle that iterates over a range of numbers by specifying the start value and the end value of the loop counter.static MethodHandleMethodHandles. doWhileLoop(MethodHandle initHandle, MethodHandle bodyHandle, MethodHandle predHandle)Produce a loop handle that wraps an initializer, a loop body and a predicate to execute a do-while loop.static MethodHandleMethodHandles. dropArguments(MethodHandle originalHandle, int location, Class<?>... valueTypes)This method returns a method handle that delegates to the original method handle, ignoring a particular range of arguments (starting at a given location and with given types).static MethodHandleMethodHandles. dropArguments(MethodHandle originalHandle, int location, List<Class<?>> valueTypes)This method returns a method handle that delegates to the original method handle, ignoring a particular range of arguments (starting at a given location and with given types).static MethodHandleMethodHandles. dropArgumentsToMatch(MethodHandle originalHandle, int skippedArgumentCount, List<Class<?>> valueTypes, int location)This method returns a method handle that delegates to the original method handle, skipping over a specified number of arguments at the given location.abstract MethodHandleCallSite. dynamicInvoker()Return a MethodHandle equivalent to the invokedynamic instruction on this CallSite.MethodHandleConstantCallSite. dynamicInvoker()Return the target MethodHandle of this CallSite.static MethodHandleMethodHandles. empty(MethodType targetMethodType)Produces a constant method handle that ignores arguments and returns the default value for the return type of the requested MethodType.static MethodHandleMethodHandles. exactInvoker(MethodType type)Return a MethodHandle that is the equivalent of calling MethodHandles.lookup().findVirtual(MethodHandle.class, "invokeExact", type).static MethodHandleMethodHandles. explicitCastArguments(MethodHandle handle, MethodType type)Produce an adapter that converts the incoming arguments from type to the underlying MethodHandle's type and converts the return value as required.static MethodHandleMethodHandles. filterArguments(MethodHandle handle, int startPosition, MethodHandle... filters)Produce a MethodHandle that adapts its arguments using the filter methodhandles before calling the underlying handle.static MethodHandleMethodHandles. filterReturnValue(MethodHandle handle, MethodHandle filter)Return a MethodHandle that will adapt the return value of handle by running the filter on it and returning the result of the filter.MethodHandleMethodHandles.Lookup. findConstructor(Class<?> declaringClass, MethodType type)Return a MethodHandle that will create an object of the required class and initialize it using the constructor method with signature type.MethodHandleMethodHandles.Lookup. findGetter(Class<?> clazz, String fieldName, Class<?> fieldType)Return a MethodHandle that provides read access to a field.MethodHandleMethodHandles.Lookup. findSetter(Class<?> clazz, String fieldName, Class<?> fieldType)Return a MethodHandle that provides write access to a field.MethodHandleMethodHandles.Lookup. findSpecial(Class<?> clazz, String methodName, MethodType type, Class<?> specialToken)Return a MethodHandle bound to a specific-implementation of a virtual method, as if created by an invokespecial bytecode using the class specialToken.MethodHandleMethodHandles.Lookup. findStatic(Class<?> clazz, String methodName, MethodType type)Return a MethodHandle to a static method.MethodHandleMethodHandles.Lookup. findStaticGetter(Class<?> clazz, String fieldName, Class<?> fieldType)Return a MethodHandle that provides read access to a field.MethodHandleMethodHandles.Lookup. findStaticSetter(Class<?> clazz, String fieldName, Class<?> fieldType)Return a MethodHandle that provides write access to a field.MethodHandleMethodHandles.Lookup. findVirtual(Class<?> clazz, String methodName, MethodType type)Return a MethodHandle to a virtual method.static MethodHandleMethodHandles. foldArguments(MethodHandle handle, int foldPosition, MethodHandle preprocessor)Produce a MethodHandle that preprocesses some of the arguments by calling the preprocessor handle.static MethodHandleMethodHandles. foldArguments(MethodHandle handle, MethodHandle preprocessor)Produce a MethodHandle that preprocesses some of the arguments by calling the preprocessor handle.abstract MethodHandleCallSite. getTarget()Return the target MethodHandle of the CallSite.MethodHandleConstantCallSite. getTarget()Return the target MethodHandle of this CallSite.MethodHandleVolatileCallSite. getTarget()The target MethodHandle is returned as though by a read of a volatile variable.static MethodHandleMethodHandles. guardWithTest(MethodHandle guard, MethodHandle trueTarget, MethodHandle falseTarget)Produce a MethodHandle that implements an if-else block.MethodHandleSwitchPoint. guardWithTest(MethodHandle target, MethodHandle fallback)Returns a method handle which always delegates either to the target or the fallback.static MethodHandleMethodHandles. identity(Class<?> classType)Produce a MethodHandle that acts as an identity function.static MethodHandleMethodHandles. insertArguments(MethodHandle originalHandle, int location, Object... values)This method returns a method handle that delegates to the original method handle, adding a particular range of arguments (starting at a given location and with given types).static MethodHandleMethodHandles. invoker(MethodType type)Return a MethodHandle that is the equivalent of calling MethodHandles.lookup().findVirtual(MethodHandle.class, "invoke", type).static MethodHandleMethodHandles. iteratedLoop(MethodHandle iteratorHandle, MethodHandle initHandle, MethodHandle bodyHandle)Produce a loop handle that iterates over a range of values produced by anIterator<T>Loop variables are updated by the return values of the corresponding step handles (including the loop body) in each iteration.static MethodHandleMethodHandles. loop(MethodHandle[]... handleClauses)Produce a loop handle that wraps the logic of loop with an array of MethodHandle clausesstatic MethodHandleMethodHandles. permuteArguments(MethodHandle handle, MethodType permuteType, int... permute)Produce a MethodHandle that will permute the incoming arguments according to the permute array.static MethodHandleMethodHandles. spreadInvoker(MethodType type, int fixedArgCount)Return a MethodHandle that is able to invoke a MethodHandle of type as though by invoke after spreading the final Object[] parameter.static MethodHandleMethodHandles. throwException(Class<?> returnType, Class<? extends Throwable> exception)Return a MethodHandle that will throw the passed in Exception object.MethodHandleVarHandle. toMethodHandle(VarHandle.AccessMode accessMode)This method creates aMethodHandlefor a specificVarHandle.AccessMode.static MethodHandleMethodHandles. tryFinally(MethodHandle tryHandle, MethodHandle finallyHandle)Produce a MethodHandle that implements a try-finally block.MethodHandleMethodHandles.Lookup. unreflect(Method method)Make a MethodHandle to the Reflect method.MethodHandleMethodHandles.Lookup. unreflectConstructor(Constructor<?> method)Return a MethodHandle for the reflect constructor.MethodHandleMethodHandles.Lookup. unreflectGetter(Field field)Create a MethodHandle that returns the value of the Reflect field.MethodHandleMethodHandles.Lookup. unreflectSetter(Field field)Create a MethodHandle that sets the value of the Reflect field.MethodHandleMethodHandles.Lookup. unreflectSpecial(Method method, Class<?> specialToken)Return a MethodHandle for the Reflect method, that will directly call the requested method as through from the classspecialToken.static MethodHandleMethodHandles. varHandleExactInvoker(VarHandle.AccessMode accessMode, MethodType expectedType)static MethodHandleMethodHandles. varHandleInvoker(VarHandle.AccessMode accessMode, MethodType expectedType)static MethodHandleMethodHandles. whileLoop(MethodHandle initHandle, MethodHandle predHandle, MethodHandle bodyHandle)Produce a loop handle that wraps an initializer, a loop body and a predicate to execute a while loop.MethodHandleMethodHandle. withVarargs(boolean isVarArityNeeded)Return a MethodHandle that is wrapped with an asVarargsCollector adapter if the handle is allowed to be variable arity.static MethodHandleMethodHandleProxies. wrapperInstanceTarget(Object x)Produces or recovers a target method handle which is behaviorally equivalent to the unique method of this wrapper instance.static MethodHandleMethodHandles. zero(Class<?> targetType)Produces a constant method handle with the default value for the requested target type.Methods in java.lang.invoke with parameters of type MethodHandle Modifier and Type Method Description static <T> TMethodHandleProxies. asInterfaceInstance(Class<T> intfc, MethodHandle target)Produces an instance of the given single-method interface which redirects its calls to the given method handle.static MethodHandleMethodHandles. catchException(MethodHandle tryHandle, Class<? extends Throwable> throwableClass, MethodHandle catchHandle)Produce a MethodHandle that implements a try-catch block.static MethodHandleMethodHandles. collectArguments(MethodHandle target, int pos, MethodHandle filter)Produce a MethodHandle that preprocesses some of the arguments by calling the filter handle.static MethodHandleMethodHandles. countedLoop(MethodHandle loopCountHandle, MethodHandle initHandle, MethodHandle bodyHandle)Produce a loop handle that executes a given number of iterations.static MethodHandleMethodHandles. countedLoop(MethodHandle startHandle, MethodHandle endHandle, MethodHandle initHandle, MethodHandle bodyHandle)Produce a loop handle that iterates over a range of numbers by specifying the start value and the end value of the loop counter.static MethodHandleMethodHandles. doWhileLoop(MethodHandle initHandle, MethodHandle bodyHandle, MethodHandle predHandle)Produce a loop handle that wraps an initializer, a loop body and a predicate to execute a do-while loop.static MethodHandleMethodHandles. dropArguments(MethodHandle originalHandle, int location, Class<?>... valueTypes)This method returns a method handle that delegates to the original method handle, ignoring a particular range of arguments (starting at a given location and with given types).static MethodHandleMethodHandles. dropArguments(MethodHandle originalHandle, int location, List<Class<?>> valueTypes)This method returns a method handle that delegates to the original method handle, ignoring a particular range of arguments (starting at a given location and with given types).static MethodHandleMethodHandles. dropArgumentsToMatch(MethodHandle originalHandle, int skippedArgumentCount, List<Class<?>> valueTypes, int location)This method returns a method handle that delegates to the original method handle, skipping over a specified number of arguments at the given location.static MethodHandleMethodHandles. explicitCastArguments(MethodHandle handle, MethodType type)Produce an adapter that converts the incoming arguments from type to the underlying MethodHandle's type and converts the return value as required.static MethodHandleMethodHandles. filterArguments(MethodHandle handle, int startPosition, MethodHandle... filters)Produce a MethodHandle that adapts its arguments using the filter methodhandles before calling the underlying handle.static MethodHandleMethodHandles. filterReturnValue(MethodHandle handle, MethodHandle filter)Return a MethodHandle that will adapt the return value of handle by running the filter on it and returning the result of the filter.static MethodHandleMethodHandles. foldArguments(MethodHandle handle, int foldPosition, MethodHandle preprocessor)Produce a MethodHandle that preprocesses some of the arguments by calling the preprocessor handle.static MethodHandleMethodHandles. foldArguments(MethodHandle handle, MethodHandle preprocessor)Produce a MethodHandle that preprocesses some of the arguments by calling the preprocessor handle.static MethodHandleMethodHandles. guardWithTest(MethodHandle guard, MethodHandle trueTarget, MethodHandle falseTarget)Produce a MethodHandle that implements an if-else block.MethodHandleSwitchPoint. guardWithTest(MethodHandle target, MethodHandle fallback)Returns a method handle which always delegates either to the target or the fallback.static MethodHandleMethodHandles. insertArguments(MethodHandle originalHandle, int location, Object... values)This method returns a method handle that delegates to the original method handle, adding a particular range of arguments (starting at a given location and with given types).static ObjectConstantBootstraps. invoke(MethodHandles.Lookup lookup, String name, Class<?> type, MethodHandle handle, Object... args)Returns the result of invoking a method handle with the provided arguments.static MethodHandleMethodHandles. iteratedLoop(MethodHandle iteratorHandle, MethodHandle initHandle, MethodHandle bodyHandle)Produce a loop handle that iterates over a range of values produced by anIterator<T>Loop variables are updated by the return values of the corresponding step handles (including the loop body) in each iteration.static MethodHandleMethodHandles. loop(MethodHandle[]... handleClauses)Produce a loop handle that wraps the logic of loop with an array of MethodHandle clausesstatic CallSiteLambdaMetafactory. metafactory(MethodHandles.Lookup caller, String invokedName, MethodType invokedType, MethodType samMethodType, MethodHandle implMethod, MethodType instantiatedMethodType)Facilitates the creation of simple "function objects" that implement one or more interfaces by delegation to a providedMethodHandle, after appropriate type adaptation and partial evaluation of arguments.static MethodHandleMethodHandles. permuteArguments(MethodHandle handle, MethodType permuteType, int... permute)Produce a MethodHandle that will permute the incoming arguments according to the permute array.static <T extends Member>
TMethodHandles. reflectAs(Class<T> expected, MethodHandle target)Gets the underlying Member of the providedtargetMethodHandle.MethodHandleInfoMethodHandles.Lookup. revealDirect(MethodHandle target)Cracks a MethodHandle, which allows access to its symbolic parts.abstract voidCallSite. setTarget(MethodHandle nextTarget)Set the CallSite's target to be nextTarget.voidConstantCallSite. setTarget(MethodHandle newTarget)Throws UnsupportedOperationException as a ConstantCallSite is permanently bound to its initial target MethodHandle.voidVolatileCallSite. setTarget(MethodHandle nextTarget)Set the CallSite's target to be nextTarget.static MethodHandleMethodHandles. tryFinally(MethodHandle tryHandle, MethodHandle finallyHandle)Produce a MethodHandle that implements a try-finally block.static MethodHandleMethodHandles. whileLoop(MethodHandle initHandle, MethodHandle predHandle, MethodHandle bodyHandle)Produce a loop handle that wraps an initializer, a loop body and a predicate to execute a while loop.Constructors in java.lang.invoke with parameters of type MethodHandle Constructor Description ConstantCallSite(MethodHandle permanentTarget)Create a ConstantCallSite with a target MethodHandle that cannot change.ConstantCallSite(MethodType targetType, MethodHandle hook)Create a ConstantCallSite and assign the hook MethodHandle's result to its permanent target.MutableCallSite(MethodHandle mutableTarget)Create a MutableCallSite permanently set to the same type as the mutableTarget and using the mutableTarget as the initial target value.VolatileCallSite(MethodHandle volatileTarget)Create a VolatileCallSite with the same type as the volatileTarget and the initial target set to volatileTarget. -
Uses of MethodHandle in jdk.dynalink
Methods in jdk.dynalink with parameters of type MethodHandle Modifier and Type Method Description voidRelinkableCallSite. initialize(MethodHandle relinkAndInvoke)Invoked by dynamic linker to initialize the relinkable call site by setting a relink-and-invoke method handle.voidRelinkableCallSite. relink(GuardedInvocation guardedInvocation, MethodHandle relinkAndInvoke)This method will be called by the dynamic linker every time the call site is relinked (but seeRelinkableCallSite.resetAndRelink(GuardedInvocation, MethodHandle)for an exception).voidRelinkableCallSite. resetAndRelink(GuardedInvocation guardedInvocation, MethodHandle relinkAndInvoke)This method will be called by the dynamic linker every time the call site is relinked and the linker wishes the call site to throw away any prior linkage state (that is how it differs fromRelinkableCallSite.relink(GuardedInvocation, MethodHandle)). -
Uses of MethodHandle in jdk.dynalink.beans
Methods in jdk.dynalink.beans that return MethodHandle Modifier and Type Method Description MethodHandleMissingMemberHandlerFactory. createMissingMemberHandler(LinkRequest linkRequest, LinkerServices linkerServices)Returns a method handle suitable for implementing missing member behavior for a particular link request. -
Uses of MethodHandle in jdk.dynalink.linker
Methods in jdk.dynalink.linker that return MethodHandle Modifier and Type Method Description MethodHandleLinkerServices. asType(MethodHandle handle, MethodType fromType)Similar toasType(MethodType)except it also hooks in method handles produced by all availableGuardingTypeConverterFactoryimplementations, providing for language-specific type coercing of parameters.MethodHandleMethodTypeConversionStrategy. asType(MethodHandle target, MethodType newType)Converts a method handle to a new type.default MethodHandleLinkerServices. asTypeLosslessReturn(MethodHandle handle, MethodType fromType)Similar toLinkerServices.asType(MethodHandle, MethodType)except it treats return value type conversion specially.MethodHandleGuardedInvocation. compose(MethodHandle fallback)Composes the invocation, guard, switch points, and the exception into a composite method handle that knows how to fall back when the guard fails or the invocation is invalidated.MethodHandleGuardedInvocation. compose(MethodHandle guardFallback, MethodHandle switchpointFallback, MethodHandle catchFallback)Composes the invocation, guard, switch points, and the exception into a composite method handle that knows how to fall back when the guard fails or the invocation is invalidated.MethodHandleLinkerServices. filterInternalObjects(MethodHandle target)Modifies the method handle so that any parameters that can receive potentially internal language runtime objects will have a filter added on them to prevent them from escaping, potentially by wrapping them.MethodHandleGuardedInvocation. getGuard()Returns the guard method handle.MethodHandleGuardedInvocation. getInvocation()Returns the invocation method handle.MethodHandleLinkerServices. getTypeConverter(Class<?> sourceType, Class<?> targetType)Given a source and target type, returns a method handle that converts between them.MethodHandleMethodHandleTransformer. transform(MethodHandle target)Transforms a method handle.Methods in jdk.dynalink.linker with parameters of type MethodHandle Modifier and Type Method Description MethodHandleLinkerServices. asType(MethodHandle handle, MethodType fromType)Similar toasType(MethodType)except it also hooks in method handles produced by all availableGuardingTypeConverterFactoryimplementations, providing for language-specific type coercing of parameters.MethodHandleMethodTypeConversionStrategy. asType(MethodHandle target, MethodType newType)Converts a method handle to a new type.default MethodHandleLinkerServices. asTypeLosslessReturn(MethodHandle handle, MethodType fromType)Similar toLinkerServices.asType(MethodHandle, MethodType)except it treats return value type conversion specially.MethodHandleGuardedInvocation. compose(MethodHandle fallback)Composes the invocation, guard, switch points, and the exception into a composite method handle that knows how to fall back when the guard fails or the invocation is invalidated.MethodHandleGuardedInvocation. compose(MethodHandle guardFallback, MethodHandle switchpointFallback, MethodHandle catchFallback)Composes the invocation, guard, switch points, and the exception into a composite method handle that knows how to fall back when the guard fails or the invocation is invalidated.GuardedInvocationGuardedInvocation. filterArguments(int pos, MethodHandle... filters)Applies argument filters to both the invocation and the guard (if it exists and has at leastpos + 1parameters) withMethodHandles.filterArguments(MethodHandle, int, MethodHandle...).MethodHandleLinkerServices. filterInternalObjects(MethodHandle target)Modifies the method handle so that any parameters that can receive potentially internal language runtime objects will have a filter added on them to prevent them from escaping, potentially by wrapping them.GuardedInvocationGuardedInvocation. replaceMethods(MethodHandle newInvocation, MethodHandle newGuard)Creates a new guarded invocation with different methods, preserving the switch point.MethodHandleMethodHandleTransformer. transform(MethodHandle target)Transforms a method handle.Constructors in jdk.dynalink.linker with parameters of type MethodHandle Constructor Description GuardedInvocation(MethodHandle invocation)Creates a new unconditional guarded invocation.GuardedInvocation(MethodHandle invocation, MethodHandle guard)Creates a new guarded invocation, with a guard method handle.GuardedInvocation(MethodHandle invocation, MethodHandle guard, SwitchPoint switchPoint)Creates a new guarded invocation, with both a guard method handle and a switch point that can be used to invalidate it.GuardedInvocation(MethodHandle invocation, MethodHandle guard, SwitchPoint[] switchPoints, Class<? extends Throwable> exception)Creates a new guarded invocation, with a guard method handle, any number of switch points that can be used to invalidate it, and an exception that if thrown when invoked also invalidates it.GuardedInvocation(MethodHandle invocation, MethodHandle guard, SwitchPoint switchPoint, Class<? extends Throwable> exception)Creates a new guarded invocation, with a guard method handle, a switch point that can be used to invalidate it, and an exception that if thrown when invoked also invalidates it.GuardedInvocation(MethodHandle invocation, SwitchPoint switchPoint)Creates a new guarded invocation that can be invalidated by a switch point. -
Uses of MethodHandle in jdk.dynalink.linker.support
Methods in jdk.dynalink.linker.support that return MethodHandle Modifier and Type Method Description static MethodHandleGuards. asType(MethodHandle test, MethodType type)Takes a method handle intended to be used as a guard, and adapts it to the requested type, but returning a boolean.static MethodHandleGuards. asType(LinkerServices linkerServices, MethodHandle test, MethodType type)Takes a method handle intended to be used as a guard, and adapts it to the requested type, but returning a boolean.MethodHandleLookup. findGetter(Class<?> refc, String name, Class<?> type)Performs aMethodHandles.Lookup.findGetter(Class, String, Class), converting any encounteredIllegalAccessExceptioninto anIllegalAccessErrorandNoSuchFieldExceptioninto aNoSuchFieldError.static MethodHandleLookup. findOwnSpecial(MethodHandles.Lookup lookup, String name, Class<?> rtype, Class<?>... ptypes)Given a lookup, finds usingLookup.findSpecial(Class, String, MethodType)a method on that lookup's class.MethodHandleLookup. findOwnSpecial(String name, Class<?> rtype, Class<?>... ptypes)Finds usingLookup.findSpecial(Class, String, MethodType)a method on that lookup's class.static MethodHandleLookup. findOwnStatic(MethodHandles.Lookup lookup, String name, Class<?> rtype, Class<?>... ptypes)Given a lookup, finds usingLookup.findStatic(Class, String, MethodType)a method on that lookup's class.MethodHandleLookup. findOwnStatic(String name, Class<?> rtype, Class<?>... ptypes)Finds usingLookup.findStatic(Class, String, MethodType)a method on that lookup's class.MethodHandleLookup. findSpecial(Class<?> declaringClass, String name, MethodType type)Performs aMethodHandles.Lookup.findSpecial(Class, String, MethodType, Class)on the underlying lookup.MethodHandleLookup. findStatic(Class<?> declaringClass, String name, MethodType type)Performs aMethodHandles.Lookup.findStatic(Class, String, MethodType)on the underlying lookup.MethodHandleLookup. findVirtual(Class<?> declaringClass, String name, MethodType type)Performs aMethodHandles.Lookup.findVirtual(Class, String, MethodType)on the underlying lookup.static MethodHandleGuards. getClassGuard(Class<?> clazz)Creates a guard method that tests its only argument for being of an exact particular class.static MethodHandleGuards. getIdentityGuard(Object obj)Creates a guard method that tests its only argument for being referentially identical to another objectstatic MethodHandleGuards. getInstanceOfGuard(Class<?> clazz)Creates a guard method that tests its only argument for being an instance of a particular class.static MethodHandleGuards. isArray(int pos, MethodType type)Creates a method handle that returns true if the argument in the specified position is a Java array.static MethodHandleGuards. isInstance(Class<?> clazz, int pos, MethodType type)Creates a method handle with arguments of a specified type, but with boolean return value.static MethodHandleGuards. isInstance(Class<?> clazz, MethodType type)Creates a method handle with arguments of a specified type, but with boolean return value.static MethodHandleGuards. isNotNull()Returns a guard that tests whether the first argument is not null.static MethodHandleGuards. isNull()Returns a guard that tests whether the first argument is null.static MethodHandleGuards. isOfClass(Class<?> clazz, MethodType type)Creates a guard method handle with arguments of a specified type, but with boolean return value.static MethodHandleLookup. unreflect(MethodHandles.Lookup lookup, Method m)Performs aMethodHandles.Lookup.unreflect(Method), converting any encounteredIllegalAccessExceptioninto anIllegalAccessError.MethodHandleLookup. unreflect(Method m)Performs aMethodHandles.Lookup.unreflect(Method), converting any encounteredIllegalAccessExceptioninto anIllegalAccessError.static MethodHandleLookup. unreflectConstructor(MethodHandles.Lookup lookup, Constructor<?> c)Performs aMethodHandles.Lookup.unreflectConstructor(Constructor), converting any encounteredIllegalAccessExceptioninto anIllegalAccessError.MethodHandleLookup. unreflectConstructor(Constructor<?> c)Performs aMethodHandles.Lookup.unreflectConstructor(Constructor), converting any encounteredIllegalAccessExceptioninto anIllegalAccessError.MethodHandleLookup. unreflectGetter(Field f)Performs aMethodHandles.Lookup.unreflectGetter(Field), converting any encounteredIllegalAccessExceptioninto anIllegalAccessError.MethodHandleLookup. unreflectSetter(Field f)Performs aMethodHandles.Lookup.unreflectSetter(Field), converting any encounteredIllegalAccessExceptioninto anIllegalAccessError.Methods in jdk.dynalink.linker.support with parameters of type MethodHandle Modifier and Type Method Description static MethodHandleGuards. asType(MethodHandle test, MethodType type)Takes a method handle intended to be used as a guard, and adapts it to the requested type, but returning a boolean.static MethodHandleGuards. asType(LinkerServices linkerServices, MethodHandle test, MethodType type)Takes a method handle intended to be used as a guard, and adapts it to the requested type, but returning a boolean.Constructors in jdk.dynalink.linker.support with parameters of type MethodHandle Constructor Description DefaultInternalObjectFilter(MethodHandle parameterFilter, MethodHandle returnFilter)Creates a new filter.
-