Package com.android.dx.dex.code
Class LocalList.Entry
java.lang.Object
com.android.dx.dex.code.LocalList.Entry
- All Implemented Interfaces:
Comparable<LocalList.Entry>
- Enclosing class:
LocalList
Entry in a local list.
-
Constructor Summary
ConstructorDescriptionEntry
(int address, LocalList.Disposition disposition, RegisterSpec spec) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(LocalList.Entry other) Compares by (in priority order) address, end then start disposition (variants of end are all consistered equivalent), and spec.boolean
int
Gets the address.Gets the disposition.getName()
Gets the variable name.int
Gets the number of the register holding the variable.Gets the RegisterSpec of the register holding the variable.Gets the variable signature.getType()
Gets the variable's type.boolean
isStart()
Gets whether this is a local start.boolean
matches
(LocalList.Entry other) Returns whether or not this instance matches the spec in the given instance.boolean
matches
(RegisterSpec otherSpec) Returns whether or not this instance matches the given spec.toString()
withDisposition
(LocalList.Disposition disposition) Returns an instance just like this one but with the disposition set as given.
-
Constructor Details
-
Entry
Constructs an instance.- Parameters:
address
->= 0;
addressdisposition
-non-null;
disposition of the localspec
-non-null;
register spec representing the variable
-
-
Method Details
-
toString
-
equals
-
compareTo
Compares by (in priority order) address, end then start disposition (variants of end are all consistered equivalent), and spec.- Specified by:
compareTo
in interfaceComparable<LocalList.Entry>
- Parameters:
other
-non-null;
entry to compare to- Returns:
-1..1;
standard result of comparison
-
getAddress
public int getAddress()Gets the address.- Returns:
>= 0;
the address
-
getDisposition
Gets the disposition.- Returns:
non-null;
the disposition
-
isStart
public boolean isStart()Gets whether this is a local start. This is just shorthand forgetDisposition() == Disposition.START
.- Returns:
true
iff this is a start
-
getName
Gets the variable name.- Returns:
null-ok;
the variable name
-
getSignature
Gets the variable signature.- Returns:
null-ok;
the variable signature
-
getType
Gets the variable's type.- Returns:
non-null;
the type
-
getRegister
public int getRegister()Gets the number of the register holding the variable.- Returns:
>= 0;
the number of the register holding the variable
-
getRegisterSpec
Gets the RegisterSpec of the register holding the variable.- Returns:
non-null;
RegisterSpec of the holding register.
-
matches
Returns whether or not this instance matches the given spec.- Parameters:
otherSpec
-non-null;
the spec in question- Returns:
true
iff this instance matchesspec
-
matches
Returns whether or not this instance matches the spec in the given instance.- Parameters:
other
-non-null;
another entry- Returns:
true
iff this instance's spec matchesother
-
withDisposition
Returns an instance just like this one but with the disposition set as given.- Parameters:
disposition
-non-null;
the new disposition- Returns:
non-null;
an appropriately-constructed instance
-