APIdia Launch Partner
Top Description Methods
java.lang.classfile

public sealed Interface BootstrapMethodEntry

permits BootstrapMethodEntryImpl
Known Direct Implementers
jdk.internal.classfile.impl.BootstrapMethodEntryImpl
Imports
java.lang.classfile.attribute.BootstrapMethodsAttribute, java.lang.classfile.constantpool.ConstantPool, .ConstantPoolBuilder, .LoadableConstantEntry, .MethodHandleEntry, java.util.List, jdk.internal.classfile.impl.BootstrapMethodEntryImpl

Models an entry in the bootstrap method table. The bootstrap method table is stored in the BootstrapMethods attribute, but is modeled by the ConstantPool, since the bootstrap method table is logically part of the constant pool.

A bootstrap method entry is composite:

BootstrapMethodEntry( MethodHandleEntry bootstrapMethod, List<LoadableConstantEntry> arguments )
BootstrapMethodEntry(
    MethodHandleEntry bootstrapMethod,
    List<LoadableConstantEntry> arguments
)
Since
24
See Also
ConstantPoolBuilder::bsmEntry

Method Summary

Modifier and TypeMethod and Description
public List<LoadableConstantEntry>

Returns:

the bootstrap arguments
arguments
()

Returns the bootstrap arguments.

public MethodHandleEntry

Returns:

the bootstrap method
bootstrapMethod
()

Returns the bootstrap method.

public int

Returns:

the index into the bootstrap method table corresponding to this entry
bsmIndex
()

Returns the index into the bootstrap method table corresponding to this entry.

public ConstantPool

Returns:

the constant pool associated with this entry
constantPool
()

Returns the constant pool associated with this entry.

Method Detail

argumentsback to summary
public List<LoadableConstantEntry> arguments()

Returns the bootstrap arguments.

Returns:List<LoadableConstantEntry>

the bootstrap arguments

bootstrapMethodback to summary
public MethodHandleEntry bootstrapMethod()

Returns the bootstrap method.

Returns:MethodHandleEntry

the bootstrap method

bsmIndexback to summary
public int bsmIndex()

Returns the index into the bootstrap method table corresponding to this entry.

Returns:int

the index into the bootstrap method table corresponding to this entry

constantPoolback to summary
public ConstantPool constantPool()

Returns the constant pool associated with this entry.

API Note

Given a ConstantPoolBuilder builder and a BootstrapMethodEntry entry, use builder.canWriteDirect(entry.constantPool()) instead of object equality of the constant pool to determine if an entry is compatible.

Returns:ConstantPool

the constant pool associated with this entry