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

# Interface CharacterRangeTableAttribute

≠
public abstract sealed interface CharacterRangeTableAttribute
extends java.lang.classfile.Attribute<java.lang.classfile.attribute.CharacterRangeTableAttribute>
permits jdk.internal.classfile.impl.BoundAttribute.BoundCharacterRangeTableAttribute, jdk.internal.classfile.impl.UnboundAttribute.UnboundCharacterRangeTableAttribute
Comparing jdk-master and valhalla-csr-open

All Superinterfaces:
  `AttributePREVIEW <CharacterRangeTableAttribute>, ClassFileElement`

public sealed interface CharacterRangeTableAttribute extends AttributePREVIEW <CharacterRangeTableAttribute>
Models the `CharacterRangeTable` attribute, which is a bidirectional mapping from ranges of positions in the source file to ranges of indices into the `code` array. Its entries are delivered as `CharacterRange` s when traversing the elements of a `CodeModel` , toggled by `ClassFile.DebugElementsOption` .

The `CharacterRangeTable` attribute consists of an array of character range entries. The character range entries form a forest data structure: any two range entries are either disjoint, or if they overlap, then one entry must be enclosed within the other, both in `code` array indices and source file character positions. The character range entries may appear in any order.

This attribute only appears on `Code` attributes, permits multiple appearances but should only appear once in a `Code` attribute. It has a data dependency on labels.

This attribute cannot be sent to a `CodeBuilder` ; its entries can be constructed with `CharacterRange` , resulting in at most one attribute instance in the built `Code` attribute.

This attribute is not predefined in the Java SE Platform. This is a JDK-specific nonstandard attribute produced by the reference implementation of the system Java compiler, defined by the `jdk.compiler` module.

Since:
  24
See Also:
  - `Attributes.characterRangeTable()`
  - `CompilationIDAttribute`
  - `SourceIDAttribute`

## Methods

- =
  public abstract java.util.List<java.lang.classfile.attribute.CharacterRangeInfo> characterRangeTable()
- =
  public static java.lang.classfile.attribute.CharacterRangeTableAttribute of(java.util.List<java.lang.classfile.attribute.CharacterRangeInfo> arg0)

## Summary

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