APIdia Launch Partner
Top Description Methods
java.lang.classfile.constantpool

public sealed Interface InvokeDynamicEntry

extends DynamicConstantPoolEntry
permits InvokeDynamicEntryImpl
Known Direct Implementers
jdk.internal.classfile.impl.AbstractPoolEntry.InvokeDynamicEntryImpl
Imports
java.lang.constant.ConstantDesc, .DynamicCallSiteDesc, .MethodTypeDesc, jdk.internal.classfile.impl.AbstractPoolEntry, .Util

Models a CONSTANT_InvokeDynamic_info structure, or the symbolic reference to a dynamically-computed call site, in the constant pool of a class file.

The use of a InvokeDynamicEntry is modeled by a DynamicCallSiteDesc symbolic descriptor. It can be obtained from InvokeDynamicEntry::asSymbol and converted back to a constant pool entry through ConstantPoolBuilder::invokeDynamicEntry.

An invoke dynamic entry is composite:

InvokeDynamicEntry( BootstrapMethodEntry bootstrap, NameAndTypeEntry nameAndType )
InvokeDynamicEntry(
    BootstrapMethodEntry bootstrap,
    NameAndTypeEntry nameAndType
)
where the type in the nameAndType is a method descriptor string.

API Note

A dynamically-computed call site is frequently called a dynamic call site, or an indy, from the abbreviation of "invoke dynamic".

Since
24
Java Virtual Machine Specification
4.4.10 The CONSTANT_Dynamic_info and CONSTANT_InvokeDynamic_info Structures
See Also
ConstantPoolBuilder::invokeDynamicEntry, DynamicCallSiteDesc, Dynamically-computed call sites

Method Summary

Modifier and TypeMethod and Description
public default DynamicCallSiteDesc

Returns:

a symbolic descriptor for this dynamic call site
asSymbol
()

Returns a symbolic descriptor for this dynamic call site.

public default MethodTypeDesc

Returns:

a symbolic descriptor for the invocation type of this dynamic call site
typeSymbol
()

Returns a symbolic descriptor for the invocation type of this dynamic call site.

Inherited from java.lang.classfile.constantpool.DynamicConstantPoolEntry:
bootstrapbootstrapMethodIndexnamenameAndTypetype

Method Detail

asSymbolback to summary
public default DynamicCallSiteDesc asSymbol()

Returns a symbolic descriptor for this dynamic call site.

Returns:DynamicCallSiteDesc

a symbolic descriptor for this dynamic call site

See Also
ConstantPoolBuilder::invokeDynamicEntry(DynamicCallSiteDesc)
typeSymbolback to summary
public default MethodTypeDesc typeSymbol()

Returns a symbolic descriptor for the invocation type of this dynamic call site.

Returns:MethodTypeDesc

a symbolic descriptor for the invocation type of this dynamic call site