Module java.base
Package java.lang.classfile.attribute

# Interface CodeAttribute

≠
public abstract sealed interface CodeAttribute
extends java.lang.classfile.Attribute<java.lang.classfile.attribute.CodeAttribute>, java.lang.classfile.CodeModel
permits jdk.internal.classfile.impl.BoundAttribute.BoundCodeAttribute
Comparing jdk-master and valhalla-csr-open

All Superinterfaces:
  `AttributePREVIEW <CodeAttribute>, AttributedElement, ClassFileElement, CodeModel, CompoundElement<CodeElement>, Iterable<CodeElement>, MethodElement`

public sealed interface CodeAttribute extends AttributePREVIEW <CodeAttribute>, CodeModel
Models the `Code` attribute (JVMS §4.7.3), which contains the bytecode of this method.

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

This attribute was introduced in the Java Platform version 1.0.2, major version 45.

API Note:
  `CodeAttribute` models properties of a `Code` attribute read from `class` files. General `class` file transformation should process and traverse a `CodeModel` in the traversal of a `MethodModel` , to support transformation of `Code` attributes currently being built.
See Java Virtual Machine Specification:
  4.7.3 The `Code` Attribute
Since:
  24
See Also:
  - `Attributes.code()`
  - `CodeModel`

## Methods

- =
  public abstract byte[] codeArray()
- =
  public abstract int codeLength()
- =
  public abstract int labelToBci(java.lang.classfile.Label arg0)
- =
  public abstract int maxLocals()
- =
  public abstract int maxStack()

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
CodeAttribute |  |  |  |  |  |  | 2 |  |  | 2
Total |  |  |  |  |  |  | 2 |  |  | 2