- All Superinterfaces:
ClassFileElement,CodeElement,PseudoInstruction
- All Known Implementing Classes:
AbstractPseudoInstruction.UnboundLocalVariableType,BoundLocalVariableType
public sealed interface LocalVariableType
extends PseudoInstruction
permits AbstractPseudoInstruction.UnboundLocalVariableType, BoundLocalVariableType
A pseudo-instruction which models a single entry in the
LocalVariableTypeTableAttribute. 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 TypeMethodDescriptionendScope()Returns the end range of the local variable scope.name()Returns the local variable name.static LocalVariableTypeReturns a local variable type pseudo-instruction.static LocalVariableTypeReturns a local variable type pseudo-instruction.Returns the local variable signature.default SignatureReturns the local variable signature.intslot()Returns the local variable slot.Returns the start range of the local variable scope.booleanWrites the local variable to the specified writer
-
Method Details
-
slot
int slot()Returns the local variable slot.- Returns:
- the local variable slot
-
name
Utf8Entry name()Returns the local variable name.- Returns:
- the local variable name
-
signature
Utf8Entry signature()Returns the local variable signature.- Returns:
- the local variable signature
-
signatureSymbol
Returns the local variable signature.- Returns:
- the local variable signature
-
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
-
writeTo
Writes the local variable to the specified writer- Parameters:
buf- the writer- Returns:
- true if the variable has been written
-
of
static LocalVariableType of(int slot, Utf8Entry nameEntry, Utf8Entry signatureEntry, Label startScope, Label endScope) Returns a local variable type pseudo-instruction.- Parameters:
slot- the local variable slotnameEntry- the local variable namesignatureEntry- the local variable signaturestartScope- the start range of the local variable scopeendScope- the end range of the local variable scope- Returns:
- a local variable type pseudo-instruction
-
of
static LocalVariableType of(int slot, String name, Signature signature, Label startScope, Label endScope) Returns a local variable type pseudo-instruction.- Parameters:
slot- the local variable slotname- the local variable namesignature- the local variable signaturestartScope- the start range of the local variable scopeendScope- the end range of the local variable scope- Returns:
- a local variable type pseudo-instruction
-