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

public sealed Interface InvokeDynamicInstruction

extends Instruction
permits BoundInvokeDynamicInstruction, UnboundInvokeDynamicInstruction
Known Direct Implementers
jdk.internal.classfile.impl.AbstractInstruction.BoundInvokeDynamicInstruction, jdk.internal.classfile.impl.AbstractInstruction.UnboundInvokeDynamicInstruction
Imports
java.lang.classfile.CodeBuilder, .CodeElement, .CodeModel, .Instruction, .Opcode, java.lang.classfile.constantpool.InvokeDynamicEntry, .LoadableConstantEntry, .Utf8Entry, java.lang.constant.ConstantDesc, .DirectMethodHandleDesc, .MethodTypeDesc, java.util.List, java.util.function.Function, jdk.internal.classfile.impl.AbstractInstruction, .Util

Models a dynamically-computed call site invocation instruction in the code array of a Code attribute. The corresponding opcode is invokedynamic. Delivered as a CodeElement when traversing the elements of a CodeModel.

A dynamically-computed call site invocation instruction is composite:

InvokeDynamicInstruction(InvokeDynamicEntry invokedynamic)
InvokeDynamicInstruction(InvokeDynamicEntry invokedynamic)
Since
24
Java Virtual Machine Specification
6.5.invokedynamic invokedynamic
See Also
Opcode.Kind#INVOKE_DYNAMIC, CodeBuilder::invokedynamic

Method Summary

Modifier and TypeMethod and Description
public default List<ConstantDesc>

Returns:

the bootstrap arguments of the call site
bootstrapArgs
()

Returns the bootstrap arguments of the call site.

public default DirectMethodHandleDesc

Returns:

the bootstrap method of the call site
bootstrapMethod
()

Returns the bootstrap method of the call site.

public InvokeDynamicEntry

Returns:

an InvokeDynamicEntry describing the call site
invokedynamic
()

Returns an InvokeDynamicEntry describing the call site.

public default Utf8Entry

Returns:

the invocation name of the call site
name
()

Returns the invocation name of the call site.

public static InvokeDynamicInstruction

Returns:

an invokedynamic instruction
of
(InvokeDynamicEntry
the constant pool entry describing the call site
invokedynamic
)

Returns an invokedynamic instruction.

public default Utf8Entry

Returns:

the invocation type of the call site
type
()

Returns the invocation type of the call site.

public default MethodTypeDesc

Returns:

the invocation type of the call site, as a symbolic descriptor
typeSymbol
()

Returns the invocation type of the call site, as a symbolic descriptor.

Inherited from java.lang.classfile.Instruction:
opcodesizeInBytes

Method Detail

bootstrapArgsback to summary
public default List<ConstantDesc> bootstrapArgs()

Returns the bootstrap arguments of the call site.

Returns:List<ConstantDesc>

the bootstrap arguments of the call site

bootstrapMethodback to summary
public default DirectMethodHandleDesc bootstrapMethod()

Returns the bootstrap method of the call site.

Returns:DirectMethodHandleDesc

the bootstrap method of the call site

invokedynamicback to summary
public InvokeDynamicEntry invokedynamic()

Returns an InvokeDynamicEntry describing the call site.

Returns:InvokeDynamicEntry

an InvokeDynamicEntry describing the call site

nameback to summary
public default Utf8Entry name()

Returns the invocation name of the call site.

Returns:Utf8Entry

the invocation name of the call site

ofback to summary
public static InvokeDynamicInstruction of(InvokeDynamicEntry invokedynamic)

Returns an invokedynamic instruction.

Parameters
invokedynamic:InvokeDynamicEntry

the constant pool entry describing the call site

Returns:InvokeDynamicInstruction

an invokedynamic instruction

typeback to summary
public default Utf8Entry type()

Returns the invocation type of the call site.

API Note

A symbolic descriptor for the invocation typeis available through typeSymbol().

Returns:Utf8Entry

the invocation type of the call site

typeSymbolback to summary
public default MethodTypeDesc typeSymbol()

Returns the invocation type of the call site, as a symbolic descriptor.

Returns:MethodTypeDesc

the invocation type of the call site, as a symbolic descriptor