Interface LocalVariable
- All Superinterfaces:
ClassFileElement
,CodeElement
,PseudoInstruction
A pseudo-instruction which models a single entry in the
LocalVariableTableAttribute
. Delivered as a CodeElement
during traversal of the elements of a CodeModel
, according to
the setting of the ClassFile.DebugElementsOption
option.- Since:
- 24
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionendScope()
Returns the end range of the local variable scope.name()
Returns the local variable name.static LocalVariable
Returns a local variable pseudo-instruction.static LocalVariable
Returns a local variable pseudo-instruction.int
slot()
Returns the local variable slot.Returns the start range of the local variable scope.type()
Returns the local variable field descriptor.default ClassDesc
Returns the local variable type, as a symbolic descriptor.
-
Method Details
-
slot
int slot()Returns the local variable slot.- Returns:
- the local variable slot
-
name
-
type
Utf8Entry type()Returns the local variable field descriptor.- Returns:
- the local variable field descriptor
-
typeSymbol
Returns the local variable type, as a symbolic descriptor.- Returns:
- the local variable type, as a symbolic descriptor
-
startScope
Label startScope()Returns the start range of the local variable scope.- Returns:
- the start range of the local variable scope
-
endScope
Label endScope()Returns the end range of the local variable scope.- Returns:
- the end range of the local variable scope
-
of
static LocalVariable of(int slot, Utf8Entry nameEntry, Utf8Entry descriptorEntry, Label startScope, Label endScope) Returns a local variable pseudo-instruction.- Parameters:
slot
- the local variable slotnameEntry
- the local variable namedescriptorEntry
- the local variable descriptorstartScope
- the start range of the local variable scopeendScope
- the end range of the local variable scope- Returns:
- a local variable pseudo-instruction
- Throws:
IllegalArgumentException
- ifslot
is out of range
-
of
static LocalVariable of(int slot, String name, ClassDesc descriptor, Label startScope, Label endScope) Returns a local variable pseudo-instruction.- Parameters:
slot
- the local variable slotname
- the local variable namedescriptor
- the local variable descriptorstartScope
- the start range of the local variable scopeendScope
- the end range of the local variable scope- Returns:
- a local variable pseudo-instruction
- Throws:
IllegalArgumentException
- ifslot
is out of range
-