APIdia Launch Partner
Top Description Inners Fields Constructors Methods
java.lang.invoke

pack-priv abstract sealed Class DelegatingMethodHandle

extends MethodHandle
permits AsVarargsCollector, WrappedMember, IntrinsicMethodHandle, CountingWrapper
Class Inheritance
Known Direct Subclasses
java.lang.invoke.MethodHandleImpl.AsVarargsCollector, java.lang.invoke.MethodHandleImpl.CountingWrapper, java.lang.invoke.MethodHandleImpl.WrappedMember, java.lang.invoke.MethodHandleImpl.IntrinsicMethodHandle
Annotations
@AOTSafeClassInitializer
Imports
java.util.Arrays, jdk.internal.vm.annotation.AOTSafeClassInitializer

A method handle whose invocation behavior is determined by a target. The delegating MH itself can hold extra "intentions" beyond the simple behavior.
Author
jrose

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
DelegatingMethodHandle.Holder

Holds pre-generated bytecode for lambda forms used by DelegatingMethodHandle.

Field Summary

Modifier and TypeField and Description
pack-priv static final LambdaForm.NamedFunction
Inherited from java.lang.invoke.MethodHandle:
form

Constructor Summary

AccessConstructor and Description
protected
protected
protected

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract MethodHandle
asTypeUncached(MethodType newType)

Overrides java.lang.invoke.MethodHandle.asTypeUncached.

Override this to change asType behavior.

private static LambdaForm
pack-priv MethodHandle
copyWith(MethodType mt, LambdaForm lf)

Implements abstract java.lang.invoke.MethodHandle.copyWith.

/ Method handle implementation methods.

protected abstract MethodHandle
getTarget()

Define this to extract the delegated target which supplies the invocation behavior.

pack-priv Class<?>
pack-priv MemberName
pack-priv String
pack-priv boolean
pack-priv boolean
pack-priv static LambdaForm
makeReinvokerForm(MethodHandle target, int whichCache, Object constraint, LambdaForm.NamedFunction getTargetFn)

pack-priv static LambdaForm
makeReinvokerForm(MethodHandle target, int whichCache, Object constraint, boolean forceInline, LambdaForm.NamedFunction getTargetFn, LambdaForm.NamedFunction preActionFn)

Create a LF which simply reinvokes a target of the given basic type.

pack-priv BoundMethodHandle
rebind()

Implements abstract java.lang.invoke.MethodHandle.rebind.

Require this method handle to be a BMH, or else replace it with a "wrapper" BMH.

pack-priv MethodHandle
private static LambdaForm.Kind
whichKind(int whichCache)

Inherited from java.lang.invoke.MethodHandle:
asCollectorasCollectorasCollectorChecksasFixedArityasSpreaderasSpreaderasTypeasVarargsCollectorbindArgumentLbindTocustomizedebugPrefixdebugStringdebugStringdescribeConstableinternalForminternalPropertiesinternalValuesintrinsicDataintrinsicNameinvokeinvokeBasicinvokeExactinvokeWithArgumentsinvokeWithArgumentsisVarargsCollectorlinkToInterfacelinkToNativelinkToSpeciallinkToStaticlinkToVirtualmaybeCustomizesetVarargsstandardStringtoStringtypeupdateFormviewAsTypeCheckswithInternalMemberNamewithVarargs

Field Detail

NF_getTargetback to summary
pack-priv static final LambdaForm.NamedFunction NF_getTarget

Constructor Detail

DelegatingMethodHandleback to summary
protected DelegatingMethodHandle(MethodHandle target)
DelegatingMethodHandleback to summary
protected DelegatingMethodHandle(MethodType type, MethodHandle target)
DelegatingMethodHandleback to summary
protected DelegatingMethodHandle(MethodType type, LambdaForm form)

Method Detail

asTypeUncachedback to summary
pack-priv abstract MethodHandle asTypeUncached(MethodType newType)

Overrides java.lang.invoke.MethodHandle.asTypeUncached.

Doc from java.lang.invoke.MethodHandle.asTypeUncached.

Override this to change asType behavior.

Annotations
@Override
chooseDelegatingFormback to summary
private static LambdaForm chooseDelegatingForm(MethodHandle target)
copyWithback to summary
pack-priv MethodHandle copyWith(MethodType mt, LambdaForm lf)

Implements abstract java.lang.invoke.MethodHandle.copyWith.

Doc from java.lang.invoke.MethodHandle.copyWith.

/ Method handle implementation methods. / Sub-classes can override these default implementations. / All these methods assume arguments are already validated.

Annotations
@Override
getTargetback to summary
protected abstract MethodHandle getTarget()

Define this to extract the delegated target which supplies the invocation behavior.

internalCallerClassback to summary
pack-priv Class<?> internalCallerClass()

Overrides java.lang.invoke.MethodHandle.internalCallerClass.

Annotations
@Override
internalMemberNameback to summary
pack-priv MemberName internalMemberName()

Overrides java.lang.invoke.MethodHandle.internalMemberName.

Annotations
@Override
internalPropertiesback to summary
pack-priv String internalProperties()

Overrides java.lang.invoke.MethodHandle.internalProperties.

Annotations
@Override
isCrackableback to summary
pack-priv boolean isCrackable()

Overrides java.lang.invoke.MethodHandle.isCrackable.

Annotations
@Override
isInvokeSpecialback to summary
pack-priv boolean isInvokeSpecial()

Overrides java.lang.invoke.MethodHandle.isInvokeSpecial.

Annotations
@Override
makeReinvokerFormback to summary
pack-priv static LambdaForm makeReinvokerForm(MethodHandle target, int whichCache, Object constraint, LambdaForm.NamedFunction getTargetFn)
makeReinvokerFormback to summary
pack-priv static LambdaForm makeReinvokerForm(MethodHandle target, int whichCache, Object constraint, boolean forceInline, LambdaForm.NamedFunction getTargetFn, LambdaForm.NamedFunction preActionFn)

Create a LF which simply reinvokes a target of the given basic type.

rebindback to summary
pack-priv BoundMethodHandle rebind()

Implements abstract java.lang.invoke.MethodHandle.rebind.

Doc from java.lang.invoke.MethodHandle.rebind.

Require this method handle to be a BMH, or else replace it with a "wrapper" BMH. Many transforms are implemented only for BMHs.

Annotations
@Override
viewAsTypeback to summary
pack-priv MethodHandle viewAsType(MethodType newType, boolean strict)

Overrides java.lang.invoke.MethodHandle.viewAsType.

Annotations
@Override
whichKindback to summary
private static LambdaForm.Kind whichKind(int whichCache)
java.lang.invoke back to summary

pack-priv final Class DelegatingMethodHandle.Holder

extends Object
Class Inheritance
Annotations
@AOTSafeClassInitializer

Holds pre-generated bytecode for lambda forms used by DelegatingMethodHandle.

This class may be substituted in the JDK's modules image, or in an AOT cache, by a version generated by GenerateJLIClassesHelper.

The method names of this class are internal tokens recognized by InvokerBytecodeGenerator#lookupPregenerated and are subject to change.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Holderback to summary
pack-priv Holder()