Interface CharacterRange
- All Superinterfaces:
ClassFileElementPREVIEW
,CodeElementPREVIEW
,PseudoInstructionPREVIEW
CharacterRange
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A pseudo-instruction which models a single entry in the
CharacterRangeTableAttribute
PREVIEW. Delivered as a CodeElement
PREVIEW
during traversal of the elements of a CodeModel
PREVIEW, according to
the setting of the ClassFile.DebugElementsOption
PREVIEW option.- Since:
- 22
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The bit mask of ASSIGNMENTCharacterRangeInfo
PREVIEW kind.static final int
The bit mask of BLOCKCharacterRangeInfo
PREVIEW kind.static final int
The bit mask of BRANCH_FALSECharacterRangeInfo
PREVIEW kind.static final int
The bit mask of BRANCH_TRUECharacterRangeInfo
PREVIEW kind.static final int
The bit mask of CREATECharacterRangeInfo
PREVIEW kind.static final int
The bit mask of FLOW_CONTROLLERCharacterRangeInfo
PREVIEW kind.static final int
The bit mask of FLOW_TARGETCharacterRangeInfo
PREVIEW kind.static final int
The bit mask of INVOKECharacterRangeInfo
PREVIEW kind.static final int
The bit mask of STATEMENTCharacterRangeInfo
PREVIEW kind. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the encoded end of the character range region (exclusive).int
Returns the encoded start of the character range region (inclusive).endScope()
Returns the end of the instruction range.int
flags()
A flags word, indicating the kind of range.static CharacterRangePREVIEW
of
(LabelPREVIEW startScope, LabelPREVIEW endScope, int characterRangeStart, int characterRangeEnd, int flags) Returns a character range pseudo-instruction.Returns the start of the instruction range.
-
Field Details
-
FLAG_STATEMENT
-
FLAG_BLOCK
-
FLAG_ASSIGNMENT
static final int FLAG_ASSIGNMENTThe bit mask of ASSIGNMENTCharacterRangeInfo
PREVIEW kind.- See Also:
-
FLAG_FLOW_CONTROLLER
static final int FLAG_FLOW_CONTROLLERThe bit mask of FLOW_CONTROLLERCharacterRangeInfo
PREVIEW kind.- See Also:
-
FLAG_FLOW_TARGET
static final int FLAG_FLOW_TARGETThe bit mask of FLOW_TARGETCharacterRangeInfo
PREVIEW kind.- See Also:
-
FLAG_INVOKE
-
FLAG_CREATE
-
FLAG_BRANCH_TRUE
static final int FLAG_BRANCH_TRUEThe bit mask of BRANCH_TRUECharacterRangeInfo
PREVIEW kind.- See Also:
-
FLAG_BRANCH_FALSE
static final int FLAG_BRANCH_FALSEThe bit mask of BRANCH_FALSECharacterRangeInfo
PREVIEW kind.- See Also:
-
-
Method Details
-
startScope
-
endScope
-
characterRangeStart
int characterRangeStart()Returns the encoded start of the character range region (inclusive). The value is constructed from the line_number/column_number pair as given byline_number << 10 + column_number
, where the source file is viewed as an array of (possibly multi-byte) characters.- Returns:
- the encoded start of the character range region (inclusive)
-
characterRangeEnd
int characterRangeEnd()Returns the encoded end of the character range region (exclusive).. The value is constructed from the line_number/column_number pair as given byline_number << 10 + column_number
, where the source file is viewed as an array of (possibly multi-byte) characters.- Returns:
- the encoded end of the character range region (exclusive)
-
flags
int flags()A flags word, indicating the kind of range. Multiple flag bits may be set. Valid flags include:- Returns:
- the flags
- See Also:
-
of
static CharacterRangePREVIEW of(LabelPREVIEW startScope, LabelPREVIEW endScope, int characterRangeStart, int characterRangeEnd, int flags) Returns a character range pseudo-instruction.- Parameters:
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- Returns:
- a character range pseudo-instruction
-
CharacterRange
when preview features are enabled.