public final class LocalVariableList extends FixedSizeList
LocalVariableTable and LocalVariableTypeTable
attributes, as well as combinations of the two.| Modifier and Type | Class and Description |
|---|---|
static class |
LocalVariableList.Item
Item in a local variable table.
|
| Modifier and Type | Field and Description |
|---|---|
static LocalVariableList |
EMPTY
non-null; zero-size instance |
| Constructor and Description |
|---|
LocalVariableList(int count)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
static LocalVariableList |
concat(LocalVariableList list1,
LocalVariableList list2)
Returns an instance which is the concatenation of the two given
instances.
|
LocalVariableList.Item |
get(int n)
Gets the indicated item.
|
LocalVariableList.Item |
itemToLocal(LocalVariableList.Item item)
Gets the local variable information in this instance which matches
the given
LocalVariableList.Item
in all respects but the type descriptor and signature, if any. |
static LocalVariableList |
mergeDescriptorsAndSignatures(LocalVariableList descriptorList,
LocalVariableList signatureList)
Returns an instance which is the result of merging the two
given instances, where one instance should have only type
descriptors and the other only type signatures.
|
LocalVariableList.Item |
pcAndIndexToLocal(int pc,
int index)
Gets the local variable information associated with a given address
and local index, if any.
|
void |
set(int n,
int startPc,
int length,
CstString name,
CstString descriptor,
CstString signature,
int index)
Sets the item at the given index.
|
void |
set(int n,
LocalVariableList.Item item)
Sets the item at the given index.
|
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toStringisImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutablepublic static final LocalVariableList EMPTY
non-null; zero-size instancepublic LocalVariableList(int count)
count - the number of elements to be in the listpublic static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2)
list1 - non-null; first instancelist2 - non-null; second instancenon-null; combined instancepublic static LocalVariableList mergeDescriptorsAndSignatures(LocalVariableList descriptorList, LocalVariableList signatureList)
descriptorList - non-null; list with descriptorssignatureList - non-null; list with signaturesnon-null; the merged resultpublic LocalVariableList.Item get(int n)
n - >= 0; which itemnull-ok; the indicated itempublic void set(int n,
LocalVariableList.Item item)
n - >= 0, < size(); which elementitem - non-null; the itempublic void set(int n,
int startPc,
int length,
CstString name,
CstString descriptor,
CstString signature,
int index)
Note: At least one of descriptor or
signature must be passed as non-null.
n - >= 0, < size(); which elementstartPc - >= 0; the start pc of this variable's scopelength - >= 0; the length (in bytecodes) of this variable's
scopename - non-null; the variable's namedescriptor - null-ok; the variable's type descriptorsignature - null-ok; the variable's type signatureindex - >= 0; the variable's local indexpublic LocalVariableList.Item itemToLocal(LocalVariableList.Item item)
LocalVariableList.Item
in all respects but the type descriptor and signature, if any.item - non-null; local variable information to matchnull-ok; the corresponding local variable information stored
in this instance, or null if there is no matching
informationpublic LocalVariableList.Item pcAndIndexToLocal(int pc, int index)
pc - >= 0; the address to look upindex - >= 0; the local variable indexnull-ok; the associated local variable information, or
null if none is knownCopyright © 2020. All Rights Reserved.