LocalVariableTable attribute. Delivered as a
CodeElement during traversal of the elements of a CodeModel,
according to the setting of the ClassFile.DebugElementsOption option.
A local variable entry is composite:
LocalVariable( int slot, String name, ClassDesc type, Label startScope, Label endScope )
slot is u2.
Another model, LocalVariableInfo, also models a local variable
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 LocalVariableTableAttribute.
API Note
LocalVariable is used for all local variables in Java source code.
If a local variable has a parameterized type, a type argument, or an array
type of one of the previous types, a LocalVariableType should be
created for that local variable as well.
LocalVariableInfo, CodeBuilder::localVariable, ClassFile.DebugElementsOption
| Modifier and Type | Method and Description |
|---|---|
| public Label | Returns: the end range of the local variable scopeReturns the end range of the local variable scope. |
| public Utf8Entry | |
| public static LocalVariable | Returns: a local variable pseudo-instructionthe local variable slot slot, Utf8Entry the local variable name nameEntry, Utf8Entry the local variable descriptor descriptorEntry, Label the start range of the local variable scope startScope, Label the end range of the local variable scope endScope)Returns a local variable pseudo-instruction. |
| public static LocalVariable | Returns: a local variable pseudo-instructionthe local variable slot slot, String the local variable name name, ClassDesc the local variable descriptor descriptor, Label the start range of the local variable scope startScope, Label the end range of the local variable scope endScope)Returns a local variable pseudo-instruction. |
| public int | |
| public Label | Returns: the start range of the local variable scopeReturns the start range of the local variable scope. |
| public Utf8Entry | Returns: the local variable field descriptor stringReturns the local variable field descriptor string. |
| public default ClassDesc | Returns: the local variable type, as a symbolic descriptorReturns the local variable type, as a symbolic descriptor. |
| endScope | back to summary |
|---|---|
| public Label endScope() Returns the end range of the local variable scope.
| |
| name | back to summary |
|---|---|
| public Utf8Entry name() Returns the local variable name.
| |
| of | back to summary |
|---|---|
| public static LocalVariable of(int slot, Utf8Entry nameEntry, Utf8Entry descriptorEntry, Label startScope, Label endScope) Returns a local variable pseudo-instruction.
| |
| of | back to summary |
|---|---|
| public static LocalVariable of(int slot, String name, ClassDesc descriptor, Label startScope, Label endScope) Returns a local variable pseudo-instruction.
| |
| slot | back to summary |
|---|---|
| public int slot() Returns the local variable slot.
It is a
| |
| startScope | back to summary |
|---|---|
| public Label startScope() Returns the start range of the local variable scope.
| |
| type | back to summary |
|---|---|
| public Utf8Entry type() Returns the local variable field descriptor string. API Note A symbolic descriptor for the type of the local variable is available
through
| |
| typeSymbol | back to summary |
|---|---|
| public default ClassDesc typeSymbol() Returns the local variable type, as a symbolic descriptor.
| |