Module java.base
Package java.lang.classfile.instructionPREVIEW

# Interface InvokeDynamicInstruction

All Superinterfaces:
  `ClassFileElementPREVIEW`, `CodeElementPREVIEW`, `InstructionPREVIEW`

public sealed interface InvokeDynamicInstruction extends InstructionPREVIEW
`InvokeDynamicInstruction` is a preview API of the Java platform.
Programs can only use `InvokeDynamicInstruction` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models an `invokedynamic` instruction in the `code` array of a `Code` attribute. Delivered as a `CodeElement`PREVIEW when traversing the elements of a `CodeModel`PREVIEW.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default List<ConstantDesc>`
  `bootstrapArgs()`
  Returns the bootstrap arguments of the call site.
  `default DirectMethodHandleDesc`
  `bootstrapMethod()`
  Returns the bootstrap method of the call site.
  `InvokeDynamicEntryPREVIEW`
  `invokedynamic()`
  Returns an `InvokeDynamicEntry`PREVIEW describing the call site.
  `default Utf8EntryPREVIEW`
  `name()`
  Returns the invocation name of the call site.
  `static InvokeDynamicInstructionPREVIEW`
  `of(InvokeDynamicEntryPREVIEW invokedynamic)`
  Returns an invokedynamic instruction.
  `default Utf8EntryPREVIEW`
  `type()`
  Returns the invocation type of the call site.
  `default MethodTypeDesc`
  `typeSymbol()`
  Returns the invocation type of the call site, as a symbolic descriptor.

  ### Methods declared in interface java.lang.classfile.InstructionPREVIEW

  `opcode, sizeInBytes`

- ## Method Details

  - ### invokedynamic

    InvokeDynamicEntryPREVIEW invokedynamic()
    Returns an `InvokeDynamicEntry`PREVIEW describing the call site.
    Returns:
      an `InvokeDynamicEntry`PREVIEW describing the call site

  - ### name

    default Utf8EntryPREVIEW name()
    Returns the invocation name of the call site.
    Returns:
      the invocation name of the call site

  - ### type

    default Utf8EntryPREVIEW type()
    Returns the invocation type of the call site.
    Returns:
      the invocation type of the call site

  - ### typeSymbol

    default MethodTypeDesc typeSymbol()
    Returns the invocation type of the call site, as a symbolic descriptor.
    Returns:
      the invocation type of the call site, as a symbolic descriptor

  - ### bootstrapMethod

    default DirectMethodHandleDesc bootstrapMethod()
    Returns the bootstrap method of the call site.
    Returns:
      the bootstrap method of the call site

  - ### bootstrapArgs

    default List<ConstantDesc> bootstrapArgs()
    Returns the bootstrap arguments of the call site.
    Returns:
      the bootstrap arguments of the call site

  - ### of

    static InvokeDynamicInstructionPREVIEW of(InvokeDynamicEntryPREVIEW invokedynamic)
    Returns an invokedynamic instruction.
    Parameters:
      `invokedynamic` - the constant pool entry describing the call site
    Returns:
      an invokedynamic instruction