Top Methods
jdk.internal.access

public Interface JavaLangInvokeAccess

Imports
jdk.internal.foreign.abi.NativeEntryPoint, java.lang.invoke.MethodHandle, .MethodHandles.Lookup, .MethodType, .VarHandle, java.lang.reflect.Constructor, .Field, java.nio.ByteOrder, java.util.List, .Map, java.util.stream.Stream

Method Summary

Modifier and TypeMethod and Description
public VarHandle
collectCoordinates(VarHandle target, int pos, MethodHandle filter)

Var handle collect coordinates combinator.

public VarHandle
dropCoordinates(VarHandle target, int pos, Class<?>... valueTypes)

Var handle drop coordinates combinator.

public Class<?>[]

Returns:

an array of exceptions, or null.
exceptionTypes
(MethodHandle
the handle to check
handle
)

A best-effort method that tries to find any exceptions thrown by the given method handle.

public VarHandle
filterCoordinates(VarHandle target, int pos, MethodHandle... filters)

Var handle filter coordinates combinator.

public VarHandle
filterValue(VarHandle target, MethodHandle filterToTarget, MethodHandle filterFromTarget)

Var handle carrier combinator.

public MethodHandle
findStatic(Class<?> defc, String name, MethodType type)

Produces a method handle of a static method with the trusted lookup.

public MethodHandle
findVirtual(Class<?> defc, String name, MethodType type)

Produces a method handle of a virtual method with the trusted lookup.

public Map<String, byte[]>
generateHolderClasses(Stream<String> traces)

Returns a map of class name in internal forms to its corresponding class bytes per the given stream of LF_RESOLVE and SPECIES_RESOLVE trace logs.

public Class<?>
getDeclaringClass(Object rmname)

Returns the declaring class for the given ResolvedMethodName.

public MethodType
getMethodType(String descriptor, ClassLoader loader)

Returns the MethodType for the given method descriptor and class loader.

public VarHandle
insertCoordinates(VarHandle target, int pos, Object... values)

Var handle insert coordinates combinator.

public boolean
isCallerSensitive(int flags)

Returns true if the given flags has MN_CALLER_SENSITIVE flag set.

public boolean
isHiddenMember(int flags)

Returns true if the given flags has MN_HIDDEN_MEMBER flag set.

public VarHandle
memorySegmentViewHandle(Class<?> carrier, long alignmentMask, ByteOrder order)

Returns a var handle view of a given memory segment.

public MethodHandle

Returns:

the native method handle
nativeMethodHandle
(NativeEntryPoint
the native entry point
nep
)

Returns a native method handle with given arguments as fallback and steering info.

public VarHandle
permuteCoordinates(VarHandle target, List<Class<?>> newCoordinates, int... reorder)

Var handle permute coordinates combinator.

public MethodHandle
reflectiveInvoker(Class<?> caller)

Returns a method handle of an invoker class injected for core reflection implementation with the following signature: reflect_invoke_V(MethodHandle mh, Object target, Object[] args) The invoker class is a hidden class which has the same defining class loader, runtime package, and protection domain as the given caller class.

public MethodHandle
serializableConstructor(Class<?> decl, Constructor<?> ctorToCall)

Returns a method handle that allocates an instance of the given class and then invoke the given constructor of one of its superclasses.

public MethodHandle
unreflectConstructor(Constructor<?> ctor)

Produces a method handle unreflecting from a Constructor with the trusted lookup

public MethodHandle
unreflectField(Field field, boolean isSetter)

Produces a method handle unreflecting from a Field with the trusted lookup

Method Detail

collectCoordinatesback to summary
public VarHandle collectCoordinates(VarHandle target, int pos, MethodHandle filter)

Var handle collect coordinates combinator. Used by java.lang.invoke.MethodHandles.

dropCoordinatesback to summary
public VarHandle dropCoordinates(VarHandle target, int pos, Class<?>... valueTypes)

Var handle drop coordinates combinator. Used by java.lang.invoke.MethodHandles.

exceptionTypesback to summary
public Class<?>[] exceptionTypes(MethodHandle handle)

A best-effort method that tries to find any exceptions thrown by the given method handle.

Parameters
handle:MethodHandle

the handle to check

Returns:Class<?>[]

an array of exceptions, or null.

filterCoordinatesback to summary
public VarHandle filterCoordinates(VarHandle target, int pos, MethodHandle... filters)

Var handle filter coordinates combinator. Used by java.lang.invoke.MethodHandles.

filterValueback to summary
public VarHandle filterValue(VarHandle target, MethodHandle filterToTarget, MethodHandle filterFromTarget)

Var handle carrier combinator. Used by java.lang.invoke.MethodHandles.

findStaticback to summary
public MethodHandle findStatic(Class<?> defc, String name, MethodType type) throws IllegalAccessException

Produces a method handle of a static method with the trusted lookup.

findVirtualback to summary
public MethodHandle findVirtual(Class<?> defc, String name, MethodType type) throws IllegalAccessException

Produces a method handle of a virtual method with the trusted lookup.

generateHolderClassesback to summary
public Map<String, byte[]> generateHolderClasses(Stream<String> traces)

Returns a map of class name in internal forms to its corresponding class bytes per the given stream of LF_RESOLVE and SPECIES_RESOLVE trace logs. Used by GenerateJLIClassesPlugin to enable generation of such classes during the jlink phase.

getDeclaringClassback to summary
public Class<?> getDeclaringClass(Object rmname)

Returns the declaring class for the given ResolvedMethodName. Used by StackFrameInfo.

getMethodTypeback to summary
public MethodType getMethodType(String descriptor, ClassLoader loader)

Returns the MethodType for the given method descriptor and class loader. Used by StackFrameInfo.

insertCoordinatesback to summary
public VarHandle insertCoordinates(VarHandle target, int pos, Object... values)

Var handle insert coordinates combinator. Used by java.lang.invoke.MethodHandles.

isCallerSensitiveback to summary
public boolean isCallerSensitive(int flags)

Returns true if the given flags has MN_CALLER_SENSITIVE flag set.

isHiddenMemberback to summary
public boolean isHiddenMember(int flags)

Returns true if the given flags has MN_HIDDEN_MEMBER flag set.

memorySegmentViewHandleback to summary
public VarHandle memorySegmentViewHandle(Class<?> carrier, long alignmentMask, ByteOrder order)

Returns a var handle view of a given memory segment. Used by jdk.internal.foreign.LayoutPath and java.lang.invoke.MethodHandles.

nativeMethodHandleback to summary
public MethodHandle nativeMethodHandle(NativeEntryPoint nep)

Returns a native method handle with given arguments as fallback and steering info. Will allow JIT to intrinsify.

Parameters
nep:NativeEntryPoint

the native entry point

Returns:MethodHandle

the native method handle

permuteCoordinatesback to summary
public VarHandle permuteCoordinates(VarHandle target, List<Class<?>> newCoordinates, int... reorder)

Var handle permute coordinates combinator. Used by java.lang.invoke.MethodHandles.

reflectiveInvokerback to summary
public MethodHandle reflectiveInvoker(Class<?> caller)

Returns a method handle of an invoker class injected for core reflection implementation with the following signature: reflect_invoke_V(MethodHandle mh, Object target, Object[] args) The invoker class is a hidden class which has the same defining class loader, runtime package, and protection domain as the given caller class.

serializableConstructorback to summary
public MethodHandle serializableConstructor(Class<?> decl, Constructor<?> ctorToCall) throws IllegalAccessException

Returns a method handle that allocates an instance of the given class and then invoke the given constructor of one of its superclasses. This method should only be used by ReflectionFactory::newConstructorForSerialization.

unreflectConstructorback to summary
public MethodHandle unreflectConstructor(Constructor<?> ctor) throws IllegalAccessException

Produces a method handle unreflecting from a Constructor with the trusted lookup

unreflectFieldback to summary
public MethodHandle unreflectField(Field field, boolean isSetter) throws IllegalAccessException

Produces a method handle unreflecting from a Field with the trusted lookup