public static class LocalVariableList.Item
extends java.lang.Object
| Constructor and Description |
|---|
Item(int startPc,
int length,
CstString name,
CstString descriptor,
CstString signature,
int index)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
CstString |
getDescriptor()
Gets the variable's type descriptor.
|
int |
getIndex()
Gets the variable's local index.
|
int |
getLength()
Gets the length (in bytecodes) of this variable's scope.
|
LocalItem |
getLocalItem()
Gets the variable's LocalItem, a (name, signature) tuple
|
int |
getStartPc()
Gets the start pc of this variable's scope.
|
Type |
getType()
Gets the variable's type descriptor.
|
boolean |
matchesAllButType(LocalVariableList.Item other)
Gets whether this instance matches (describes) the given
other instance exactly in all fields except type descriptor and
type signature.
|
boolean |
matchesPcAndIndex(int pc,
int index)
Gets whether this instance matches (describes) the given
address and index.
|
LocalVariableList.Item |
withSignature(CstString newSignature)
Constructs and returns an instance which is identical to this
one, except that the signature is changed to the given value.
|
public Item(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.
startPc - >= 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 int getStartPc()
>= 0; the start pc of this variable's scopepublic int getLength()
>= 0; the length (in bytecodes) of this variable's scopepublic CstString getDescriptor()
null-ok; the variable's type descriptorpublic LocalItem getLocalItem()
null-ok; the variable's type descriptorpublic int getIndex()
>= 0; the variable's local indexpublic Type getType()
Type.intern(getDescriptor().getString()).non-null; the variable's typepublic LocalVariableList.Item withSignature(CstString newSignature)
newSignature - non-null; the new signaturenon-null; an appropriately-constructed instancepublic boolean matchesPcAndIndex(int pc,
int index)
pc - >= 0; the address in questionindex - >= 0; the local variable index in questiontrue iff this instance matches pc
and indexpublic boolean matchesAllButType(LocalVariableList.Item other)
other - non-null; the instance to compare totrue iff this instance matchesCopyright © 2020. All Rights Reserved.