- All Superinterfaces:
ClassFileElement,CodeElement,PseudoInstruction
A pseudo-instruction which models a single entry in the
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.
- Since:
- 24
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe bit mask of ASSIGNMENTCharacterRangeInfokind.static final intThe bit mask of BLOCKCharacterRangeInfokind.static final intThe bit mask of BRANCH_FALSECharacterRangeInfokind.static final intThe bit mask of BRANCH_TRUECharacterRangeInfokind.static final intThe bit mask of CREATECharacterRangeInfokind.static final intThe bit mask of FLOW_CONTROLLERCharacterRangeInfokind.static final intThe bit mask of FLOW_TARGETCharacterRangeInfokind.static final intThe bit mask of INVOKECharacterRangeInfokind.static final intThe bit mask of STATEMENTCharacterRangeInfokind. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the encoded end of the character range region (exclusive).intReturns the encoded start of the character range region (inclusive).endScope()Returns the end of the instruction range.intflags()A flags word, indicating the kind of range.static CharacterRangeReturns a character range pseudo-instruction.Returns the start of the instruction range.
-
Field Details
-
FLAG_STATEMENT
static final int FLAG_STATEMENTThe bit mask of STATEMENTCharacterRangeInfokind.- See Also:
-
FLAG_BLOCK
static final int FLAG_BLOCKThe bit mask of BLOCKCharacterRangeInfokind.- See Also:
-
FLAG_ASSIGNMENT
static final int FLAG_ASSIGNMENTThe bit mask of ASSIGNMENTCharacterRangeInfokind.- See Also:
-
FLAG_FLOW_CONTROLLER
static final int FLAG_FLOW_CONTROLLERThe bit mask of FLOW_CONTROLLERCharacterRangeInfokind.- See Also:
-
FLAG_FLOW_TARGET
static final int FLAG_FLOW_TARGETThe bit mask of FLOW_TARGETCharacterRangeInfokind.- See Also:
-
FLAG_INVOKE
static final int FLAG_INVOKEThe bit mask of INVOKECharacterRangeInfokind.- See Also:
-
FLAG_CREATE
static final int FLAG_CREATEThe bit mask of CREATECharacterRangeInfokind.- See Also:
-
FLAG_BRANCH_TRUE
static final int FLAG_BRANCH_TRUEThe bit mask of BRANCH_TRUECharacterRangeInfokind.- See Also:
-
FLAG_BRANCH_FALSE
static final int FLAG_BRANCH_FALSEThe bit mask of BRANCH_FALSECharacterRangeInfokind.- See Also:
-
-
Method Details
-
startScope
Label startScope()Returns the start of the instruction range.- Returns:
- the start of the instruction range
-
endScope
Label endScope()Returns the end of the instruction range.- Returns:
- the end of the instruction range
-
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 CharacterRange of(Label startScope, Label 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
- Throws:
IllegalArgumentException- ifflagsis notu2
-