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

public sealed Interface BootstrapMethodsAttribute

extends Attribute<BootstrapMethodsAttribute>
permits BoundBootstrapMethodsAttribute, EmptyBootstrapAttribute
Known Direct Implementers
jdk.internal.classfile.impl.BoundAttribute.BoundBootstrapMethodsAttribute, jdk.internal.classfile.impl.UnboundAttribute.EmptyBootstrapAttribute
Imports
java.lang.classfile.Attribute, .AttributeMapper, .AttributeMapper.AttributeStability, .Attributes, .BootstrapMethodEntry, .ClassFile, .ClassModel, java.lang.classfile.constantpool.ConstantPool, .ConstantPoolBuilder, java.util.List, jdk.internal.classfile.impl.BoundAttribute, .UnboundAttribute

Models the BootstrapMethods attribute (JVMS 4.7.23), which stores symbolic information for the execution of bootstrap methods, used by dynamically-computed call sites and constants. It is logically a part of the constant pool of a class file and thus not delivered in ClassModel traversal; its elements are accessible through ConstantPool.

This attribute only appears on classes, and does not permit multiple instances in a class. It has a data dependency on the constant pool.

This attribute cannot be constructed directly; its entries can be constructed through ConstantPoolBuilder#bsmEntry, resulting in at most one attribute instance in the built class file.

The attribute was introduced in the Java SE Platform version 7, major version 51.

Since
24
Java Virtual Machine Specification
4.7.23 The BootstrapMethods Attribute
See Also
Attributes#bootstrapMethods(), Execution of bootstrap methods

Method Summary

Modifier and TypeMethod and Description
public List<BootstrapMethodEntry>

Returns:

the elements of the bootstrap method table
bootstrapMethods
()

Returns the elements of the bootstrap method table.

public int

Returns:

the size of the bootstrap methods table
bootstrapMethodsSize
()

Returns the size of the bootstrap methods table.

Inherited from java.lang.classfile.Attribute:
attributeMapperattributeName

Method Detail

bootstrapMethodsback to summary
public List<BootstrapMethodEntry> bootstrapMethods()

Returns the elements of the bootstrap method table.

Returns:List<BootstrapMethodEntry>

the elements of the bootstrap method table

bootstrapMethodsSizeback to summary
public int bootstrapMethodsSize()

Returns the size of the bootstrap methods table.

Returns:int

the size of the bootstrap methods table