Top Description Fields Constructors Methods
java.lang.constant

pack-priv final Class AsTypeMethodHandleDesc

extends DynamicConstantDesc<MethodHandle>
implements MethodHandleDesc
Class Inheritance
All Implemented Interfaces
java.lang.constant.MethodHandleDesc, java.lang.constant.ConstantDesc
Imports
java.lang.invoke.MethodHandle, .MethodHandles, .MethodType

A nominal descriptor for a MethodHandle constant that performs a MethodHandle#asType(MethodType) adaptation on another MethodHandle.

Field Summary

Modifier and TypeField and Description
private final MethodTypeDesc
private final MethodHandleDesc

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public MethodTypeDesc
invocationType()

Implements java.lang.constant.MethodHandleDesc.invocationType.

Returns a MethodTypeDesc describing the invocation type of the method handle described by this nominal descriptor.

public MethodHandle
resolveConstantDesc(MethodHandles.Lookup
The MethodHandles.Lookup to provide name resolution and access control context
lookup
)

Overrides java.lang.constant.DynamicConstantDesc.resolveConstantDesc.

Implements java.lang.constant.MethodHandleDesc.resolveConstantDesc, java.lang.constant.ConstantDesc.resolveConstantDesc.

Resolves this descriptor reflectively, emulating the resolution behavior of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4.

public String
toString()

Overrides java.lang.constant.DynamicConstantDesc.toString.

Returns a compact textual description of this constant description, including the bootstrap method, the constant name and type, and the static bootstrap arguments.

Inherited from java.lang.constant.DynamicConstantDesc:
bootstrapArgsbootstrapArgsListbootstrapMethodconstantNameconstantTypeequalshashCodeofofofCanonicalofNamed

Field Detail

typeback to summary
private final MethodTypeDesc type
underlyingback to summary
private final MethodHandleDesc underlying

Constructor Detail

AsTypeMethodHandleDescback to summary
pack-priv AsTypeMethodHandleDesc(MethodHandleDesc underlying, MethodTypeDesc type)

Method Detail

invocationTypeback to summary
public MethodTypeDesc invocationType()

Implements java.lang.constant.MethodHandleDesc.invocationType.

Doc from java.lang.constant.MethodHandleDesc.invocationType.

Returns a MethodTypeDesc describing the invocation type of the method handle described by this nominal descriptor. The invocation type describes the full set of stack values that are consumed by the invocation (including the receiver, if any).

Returns:MethodTypeDesc

a MethodHandleDesc describing the method handle type

Annotations
@Override
resolveConstantDescback to summary
public MethodHandle resolveConstantDesc(MethodHandles.Lookup lookup) throws ReflectiveOperationException

Overrides java.lang.constant.DynamicConstantDesc.resolveConstantDesc.

Implements java.lang.constant.MethodHandleDesc.resolveConstantDesc, java.lang.constant.ConstantDesc.resolveConstantDesc.

Doc from java.lang.constant.ConstantDesc.resolveConstantDesc.

Resolves this descriptor reflectively, emulating the resolution behavior of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4. The resolution and access control context is provided by the MethodHandles.Lookup parameter. No caching of the resulting value is performed.

Parameters
lookup:MethodHandles.Lookup

The MethodHandles.Lookup to provide name resolution and access control context

Returns:MethodHandle

the resolved constant value

Annotations
@Override
Exceptions
ReflectiveOperationException:
if a class, method, or field could not be reflectively resolved in the course of resolution
toStringback to summary
public String toString()

Overrides java.lang.constant.DynamicConstantDesc.toString.

Doc from java.lang.constant.DynamicConstantDesc.toString.

Returns a compact textual description of this constant description, including the bootstrap method, the constant name and type, and the static bootstrap arguments.

Returns:String

A compact textual description of this call site descriptor

Annotations
@Override