Uses of Class
java.lang.invoke.MethodHandles.Lookup
-
Packages that use MethodHandles.Lookup 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.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 MethodHandles.Lookup in java.lang.invoke
Methods in java.lang.invoke that return MethodHandles.Lookup Modifier and Type Method Description MethodHandles.LookupMethodHandles.Lookup. dropLookupMode(int dropMode)Return a MethodHandles.Lookup object without the requested lookup mode.MethodHandles.LookupMethodHandles.Lookup. in(Class<?> lookupClass)Create a lookup on the request class.static MethodHandles.LookupMethodHandles. lookup()Return a MethodHandles.Lookup object for the caller.static MethodHandles.LookupMethodHandles. privateLookupIn(Class<?> targetClass, MethodHandles.Lookup callerLookup)Return a MethodHandles.Lookup object with full capabilities including the access to theprivatemembers in the requested classstatic MethodHandles.LookupMethodHandles. publicLookup()Return a MethodHandles.Lookup object that is only able to accesspublicmembers.Methods in java.lang.invoke with parameters of type MethodHandles.Lookup Modifier and Type Method Description static CallSiteLambdaMetafactory. altMetafactory(MethodHandles.Lookup caller, String invokedName, MethodType invokedType, Object... args)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 VarHandleConstantBootstraps. arrayVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> arrayClass)Finds aVarHandlefor an array type.static <E extends Enum<E>>
EConstantBootstraps. enumConstant(MethodHandles.Lookup lookup, String name, Class<E> type)Returns anenumconstant of the type specified bytypewith the name specified byname.static VarHandleConstantBootstraps. fieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)Finds aVarHandlefor an instance field.static ObjectConstantBootstraps. getStaticFinal(MethodHandles.Lookup lookup, String name, Class<?> type)Returns the value of a static final field declared in the class which is the same as the field's type (or, for primitive-valued fields, declared in the wrapper class.)static ObjectConstantBootstraps. getStaticFinal(MethodHandles.Lookup lookup, String name, Class<?> type, Class<?> declaringClass)Returns the value of a static final field.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 CallSiteStringConcatFactory. makeConcat(MethodHandles.Lookup lookup, String name, MethodType concatType)Facilitates the creation of optimized String concatenation methods, that can be used to efficiently concatenate a known number of arguments of known types, possibly after type adaptation and partial evaluation of arguments.static CallSiteStringConcatFactory. makeConcatWithConstants(MethodHandles.Lookup lookup, String name, MethodType concatType, String recipe, Object... constants)Facilitates the creation of optimized String concatenation methods, that can be used to efficiently concatenate a known number of arguments of known types, possibly after type adaptation and partial evaluation of arguments.static 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 ObjectConstantBootstraps. nullConstant(MethodHandles.Lookup lookup, String name, Class<?> type)Returns anullobject reference for the reference type specified bytype.static Class<?>ConstantBootstraps. primitiveClass(MethodHandles.Lookup lookup, String name, Class<?> type)Returns aClassmirror for the primitive type whose type descriptor is specified byname.static MethodHandles.LookupMethodHandles. privateLookupIn(Class<?> targetClass, MethodHandles.Lookup callerLookup)Return a MethodHandles.Lookup object with full capabilities including the access to theprivatemembers in the requested class<T extends Member>
TMethodHandleInfo. reflectAs(Class<T> expected, MethodHandles.Lookup lookup)Reflects the underlying member as a Method, Field or Constructor.static VarHandleConstantBootstraps. staticFieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)Finds aVarHandlefor a static field. -
Uses of MethodHandles.Lookup in jdk.dynalink
Methods in jdk.dynalink that return MethodHandles.Lookup Modifier and Type Method Description MethodHandles.LookupSecureLookupSupplier. getLookup()Returns the lookup secured by thisSecureLookupSupplier.protected MethodHandles.LookupSecureLookupSupplier. getLookupPrivileged()Returns the value ofSecureLookupSupplier.getLookup()without a security check.Constructors in jdk.dynalink with parameters of type MethodHandles.Lookup Constructor Description CallSiteDescriptor(MethodHandles.Lookup lookup, Operation operation, MethodType methodType)Creates a new call site descriptor.SecureLookupSupplier(MethodHandles.Lookup lookup)Creates a new secure lookup supplier, securing the passed lookup. -
Uses of MethodHandles.Lookup in jdk.dynalink.linker
Method parameters in jdk.dynalink.linker with type arguments of type MethodHandles.Lookup Modifier and Type Method Description GuardedInvocationGuardingTypeConverterFactory. convertToType(Class<?> sourceType, Class<?> targetType, Supplier<MethodHandles.Lookup> lookupSupplier)Returns a guarded type conversion that receives a value of the specified source type and returns a value converted to the specified target type. -
Uses of MethodHandles.Lookup in jdk.dynalink.linker.support
Methods in jdk.dynalink.linker.support with parameters of type MethodHandles.Lookup Modifier and Type Method Description 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.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.static MethodHandleLookup. unreflect(MethodHandles.Lookup lookup, Method m)Performs aunreflect(Method), converting any encounteredIllegalAccessExceptioninto anIllegalAccessError.static MethodHandleLookup. unreflectConstructor(MethodHandles.Lookup lookup, Constructor<?> c)Performs aunreflectConstructor(Constructor), converting any encounteredIllegalAccessExceptioninto anIllegalAccessError.Constructors in jdk.dynalink.linker.support with parameters of type MethodHandles.Lookup Constructor Description Lookup(MethodHandles.Lookup lookup)Creates a new instance, bound to an instance ofMethodHandles.Lookup.
-