Attribute<BootstrapMethodsAttribute>, ClassFileElementpublic sealed interface BootstrapMethodsAttribute extends Attribute<BootstrapMethodsAttribute>
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(DirectMethodHandleDesc, List), 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.
BootstrapMethods Attribute| Modifier and Type | Method | Description |
|---|---|---|
List |
bootstrapMethods() |
Returns the elements of the bootstrap method table. |
int |
bootstrapMethodsSize() |
Returns the size of the bootstrap methods table. |
attributeMapper, attributeName
List<BootstrapMethodEntry> bootstrapMethods()
int bootstrapMethodsSize()
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/attribute/BootstrapMethodsAttribute.html