Top Description Methods
java.lang.classfile.constantpool

public sealed Interface DynamicConstantPoolEntry

extends PoolEntry
Known Direct Subinterfaces
java.lang.classfile.constantpool.InvokeDynamicEntry, java.lang.classfile.constantpool.ConstantDynamicEntry
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.lang.classfile.BootstrapMethodEntry, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

Programs can only use DynamicConstantPoolEntry when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

Models a dynamic constant pool entry, which is either ConstantDynamicEntry or InvokeDynamicEntry.
Since
22
Java Virtual Machine Specification
4.4.10 The CONSTANT_Dynamic_info and CONSTANT_InvokeDynamic_info Structures

Method Summary

Modifier and TypeMethod and Description
public BootstrapMethodEntry

Returns:

the entry in the bootstrap method table for this constant
bootstrap
()

Returns the entry in the bootstrap method table for this constant.

public int

Returns:

index of the entry in the bootstrap method table for this constant
bootstrapMethodIndex
()

Returns index of the entry in the bootstrap method table for this constant.

public default Utf8Entry

Returns:

the invocation name
name
()

Returns the invocation name.

public NameAndTypeEntry

Returns:

the invocation name and type
nameAndType
()

Returns the invocation name and type.

public default Utf8Entry

Returns:

the invocation type
type
()

Returns the invocation type.

Inherited from java.lang.classfile.constantpool.PoolEntry:
constantPoolindextagwidth

Method Detail

bootstrapback to summary
public BootstrapMethodEntry bootstrap()

Returns the entry in the bootstrap method table for this constant.

Returns:BootstrapMethodEntry

the entry in the bootstrap method table for this constant

bootstrapMethodIndexback to summary
public int bootstrapMethodIndex()

Returns index of the entry in the bootstrap method table for this constant.

Returns:int

index of the entry in the bootstrap method table for this constant

nameback to summary
public default Utf8Entry name()

Returns the invocation name.

Returns:Utf8Entry

the invocation name

nameAndTypeback to summary
public NameAndTypeEntry nameAndType()

Returns the invocation name and type.

Returns:NameAndTypeEntry

the invocation name and type

typeback to summary
public default Utf8Entry type()

Returns the invocation type.

Returns:Utf8Entry

the invocation type