Top Description Methods
java.lang.classfile.instruction

public sealed Interface CharacterRange

extends PseudoInstruction
Known Direct Implementers
jdk.internal.classfile.impl.AbstractPseudoInstruction.UnboundCharacterRange, jdk.internal.classfile.impl.BoundCharacterRange
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.lang.classfile.ClassFile, .CodeElement, .CodeModel, .Label, .PseudoInstruction, java.lang.classfile.attribute.CharacterRangeTableAttribute, jdk.internal.classfile.impl.AbstractPseudoInstruction, .BoundCharacterRange, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

Programs can only use CharacterRange when preview features are enabled.
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. Delivered as a CodeElement during traversal of the elements of a CodeModel, according to the setting of the ClassFile.DebugElementsOption option.
Since
22

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the encoded end of the character range region (exclusive)
characterRangeEnd
()

Returns the encoded end of the character range region (exclusive).

public int

Returns:

the encoded start of the character range region (inclusive)
characterRangeStart
()

Returns the encoded start of the character range region (inclusive).

public Label

Returns:

the end of the instruction range
endScope
()

Returns the end of the instruction range.

public int

Returns:

the flags
flags
()

A flags word, indicating the kind of range.

public static CharacterRange

Returns:

a character range pseudo-instruction
of
(Label
the start of the instruction range
startScope
,
Label
the end of the instruction range
endScope
,
int
the encoded start of the character range region (inclusive)
characterRangeStart
,
int
the encoded end of the character range region (exclusive)
characterRangeEnd
,
int
a flags word, indicating the kind of range
flags
)

Returns a character range pseudo-instruction.

public Label

Returns:

the start of the instruction range
startScope
()

Returns the start of the instruction range.

Method Detail

characterRangeEndback to summary
public 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 by line_number << 10 + column_number, where the source file is viewed as an array of (possibly multi-byte) characters.

Returns:int

the encoded end of the character range region (exclusive)

characterRangeStartback to summary
public 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 by line_number << 10 + column_number, where the source file is viewed as an array of (possibly multi-byte) characters.

Returns:int

the encoded start of the character range region (inclusive)

endScopeback to summary
public Label endScope()

Returns the end of the instruction range.

Returns:Label

the end of the instruction range

flagsback to summary
public int flags()

A flags word, indicating the kind of range. Multiple flag bits may be set. Valid flags include:

Returns:int

the flags

See Also
java.lang.classfile.attribute.CharacterRangeInfo#flags()
ofback to summary
public static CharacterRange of(Label startScope, Label endScope, int characterRangeStart, int characterRangeEnd, int flags)

Returns a character range pseudo-instruction.

Parameters
startScope:Label

the start of the instruction range

endScope:Label

the end of the instruction range

characterRangeStart:int

the encoded start of the character range region (inclusive)

characterRangeEnd:int

the encoded end of the character range region (exclusive)

flags:int

a flags word, indicating the kind of range

Returns:CharacterRange

a character range pseudo-instruction

startScopeback to summary
public Label startScope()

Returns the start of the instruction range.

Returns:Label

the start of the instruction range