ClassFileElement, CodeElement, PseudoInstructionpublic sealed interface CharacterRange extends PseudoInstruction
CharacterRangeTable attribute. Delivered as a CodeElement during traversal of the elements of a CodeModel, according to the setting of the ClassFile.DebugElementsOption option. A character range entry is composite:
CharacterRange(
Label startScope,
Label endScope,
int characterRangeStart,
int characterRangeEnd,
int flags
)
Another model, CharacterRangeInfo, also models a character range entry; it has no dependency on a CodeModel and represents of bci values as ints instead of Labels, and is used as components of a CharacterRangeTableAttribute.
| Modifier and Type | Field | Description |
|---|---|---|
static final int |
FLAG_ASSIGNMENT |
The bit mask of ASSIGNMENT CharacterRangeInfo kind. |
static final int |
FLAG_BLOCK |
The bit mask of BLOCK CharacterRangeInfo kind. |
static final int |
FLAG_BRANCH_FALSE |
The bit mask of BRANCH_FALSE CharacterRangeInfo kind. |
static final int |
FLAG_BRANCH_TRUE |
The bit mask of BRANCH_TRUE CharacterRangeInfo kind. |
static final int |
FLAG_CREATE |
The bit mask of CREATE CharacterRangeInfo kind. |
static final int |
FLAG_FLOW_CONTROLLER |
The bit mask of FLOW_CONTROLLER CharacterRangeInfo kind. |
static final int |
FLAG_FLOW_TARGET |
The bit mask of FLOW_TARGET CharacterRangeInfo kind. |
static final int |
FLAG_INVOKE |
The bit mask of INVOKE CharacterRangeInfo kind. |
static final int |
FLAG_STATEMENT |
The bit mask of STATEMENT CharacterRangeInfo kind. |
| Modifier and Type | Method | Description |
|---|---|---|
int |
characterRangeEnd() |
Returns the encoded end of the character range region (exclusive). |
int |
characterRangeStart() |
Returns the encoded start of the character range region (inclusive). |
Label |
endScope() |
Returns the end of the instruction range. |
int |
flags() |
A flags word, indicating the kind of range. |
static CharacterRange |
of |
Returns a character range pseudo-instruction. |
Label |
startScope() |
Returns the start of the instruction range. |
static final int FLAG_FLOW_CONTROLLER
CharacterRangeInfo kind.Label startScope()
Label endScope()
int characterRangeStart()
line_number << 10 + column_number, where the source file is viewed as an array of (possibly multi-byte) characters.int characterRangeEnd()
line_number << 10 + column_number, where the source file is viewed as an array of (possibly multi-byte) characters.int flags()
static CharacterRange of(Label startScope, Label endScope, int characterRangeStart, int characterRangeEnd, int flags)
startScope - the start of the instruction rangeendScope - the end of the instruction rangecharacterRangeStart - the encoded start of the character range region (inclusive)characterRangeEnd - the encoded end of the character range region (exclusive)flags - a flags word, indicating the kind of range
© 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/instruction/CharacterRange.html