• Nested Class Summary

    Nested Classes

    static final class 

    A lookup object is a factory for creating method handles, when the creation requires access checking.

  • Method Summary

    Produces a method handle constructing arrays of a desired type, as if by the anewarray bytecode.

    Produces a method handle giving read access to elements of an array, as if by the aaload bytecode.

    Produces a method handle giving write access to elements of an array, as if by the astore bytecode.

    Produces a VarHandle giving access to elements of an array of type arrayClass.

    Produces a method handle returning the length of an array, as if by the arraylength bytecode.

    Produces a VarHandle giving access to elements of a byte[] array viewed as if it were a different primitive array type, such as int[] or long[].

    Produces a VarHandle giving access to elements of a ByteBuffer viewed as if it were an array of elements of a different primitive component type to that of byte, such as int[] or long[].

    Makes a method handle which adapts a target method handle, by running it inside an exception handler.

    static <T> T

    Returns the class data associated with the lookup class of the given caller lookup object, or null.

    static <T> T

    Returns the element at the specified index in the class data, if the class data associated with the lookup class of the given caller lookup object is a List.

    Adapts a target method handle by pre-processing a sub-sequence of its arguments with a filter (another method handle).

    Adapts a target var handle by pre-processing a sub-sequence of its coordinate values with a filter (a method handle).

    Produces a method handle of the requested return type which returns the given constant value every time it is invoked.

    Constructs a loop that runs a given number of iterations.

    Constructs a loop that counts over a range of numbers.

    Constructs a do-while loop from an initializer, a body, and a predicate.

    Produces a method handle which will discard some dummy arguments before calling some other specified target method handle.

    Produces a method handle which will discard some dummy arguments before calling some other specified target method handle.

    Adapts a target method handle to match the given parameter type list.

    Returns a var handle which will discard some dummy coordinates before delegating to the target var handle.

    Drop the return value of the target handle (if any).

    Produces a method handle of the requested type which ignores any arguments, does nothing, and returns a suitable default depending on the return type.

    Produces a special invoker method handle which can be used to invoke any method handle of the given type, as if by invokeExact.

    Produces a method handle which adapts the type of the given method handle to a new type by pairwise argument and return type conversion.

    Adapts a target method handle by pre-processing one or more of its arguments, each with its own unary filter function, and then calling the target with each pre-processed argument replaced by the result of its corresponding filter function.

    Adapts a target var handle by pre-processing incoming coordinate values using unary filter functions.

    Adapts a target method handle by post-processing its return value (if any) with a filter (another method handle).

    Adapts a target var handle by pre-processing incoming and outgoing values using a pair of filter functions.

    Adapts a target method handle by pre-processing some of its arguments, starting at a given position, and then calling the target with the result of the pre-processing, inserted into the original sequence of arguments just before the folded arguments.

    Adapts a target method handle by pre-processing some of its arguments, and then calling the target with the result of the pre-processing, inserted into the original sequence of arguments.

    Makes a method handle which adapts a target method handle, by guarding it with a test, a boolean-valued method handle.

    Produces a method handle which returns its sole argument when invoked.

    Provides a target method handle with one or more bound arguments in advance of the method handle's invocation.

    Provides a target var handle with one or more bound coordinates in advance of the var handle's invocation.

    Produces a special invoker method handle which can be used to invoke any method handle compatible with the given type, as if by invoke.

    Constructs a loop that ranges over the values produced by an Iterator<T>.

    lookup()

    Returns a lookup object with full capabilities to emulate all supported bytecode behaviors of the caller.

    Constructs a method handle representing a loop with several loop variables that are updated and checked upon each iteration.

    Produces a method handle which adapts the calling sequence of the given method handle to a new type, by reordering the arguments.

    Provides a var handle which adapts the coordinate values of the target var handle, by re-arranging them so that the new coordinates match the provided ones.

    Returns a lookup object on a target class to emulate all supported bytecode behaviors, including private access.

    static <T extends Member>
    T

    Produces a method handle which will invoke any method handle of the given type, with a given number of trailing arguments replaced by a single trailing Object[] array.

    Creates a table switch method handle, which can be used to switch over a set of target method handles, based on a given target index, called selector.

    Produces a method handle which will throw exceptions of the given exType.

    Makes a method handle that adapts a target method handle by wrapping it in a try-finally block.

    Produces a special invoker method handle which can be used to invoke a signature-polymorphic access mode method on any VarHandle whose associated access mode type is compatible with the given type.

    Produces a special invoker method handle which can be used to invoke a signature-polymorphic access mode method on any VarHandle whose associated access mode type is compatible with the given type.

    Constructs a while loop from an initializer, a body, and a predicate.

    Produces a constant method handle of the requested return type which returns the default value for that type every time it is invoked.

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Creates and returns a copy of this object.

    boolean

    Indicates whether some other object is "equal to" this one.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    int

    Returns a hash code value for this object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    Returns a string representation of the object.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Method Details

    • lookup

    • publicLookup

    • privateLookupIn

    • classData

    • classDataAt

    • reflectAs

    • arrayConstructor

    • arrayLength

    • arrayElementGetter

    • arrayElementSetter

    • arrayElementVarHandle

    • byteArrayViewVarHandle

    • byteBufferViewVarHandle

    • spreadInvoker

    • exactInvoker

    • invoker

    • varHandleExactInvoker

    • varHandleInvoker

    • explicitCastArguments

    • permuteArguments

    • constant

    • identity

    • zero

    • empty

    • insertArguments

    • dropArguments

    • dropArguments

    • dropArgumentsToMatch

    • dropReturn

    • filterArguments

    • collectArguments

    • filterReturnValue

    • foldArguments

    • foldArguments

    • guardWithTest

    • catchException

    • throwException

    • loop

    • whileLoop

    • doWhileLoop

    • countedLoop

    • countedLoop

    • iteratedLoop

    • tryFinally

    • tableSwitch

    • filterValue

    • filterCoordinates

    • insertCoordinates

    • permuteCoordinates

    • collectCoordinates

    • dropCoordinates