Class LocalList.Entry

java.lang.Object
com.android.dx.dex.code.LocalList.Entry
All Implemented Interfaces:
Comparable<LocalList.Entry>
Enclosing class:
LocalList

public static class LocalList.Entry extends Object implements Comparable<LocalList.Entry>
Entry in a local list.
  • Constructor Details

    • Entry

      public Entry(int address, LocalList.Disposition disposition, RegisterSpec spec)
      Constructs an instance.
      Parameters:
      address - >= 0; address
      disposition - non-null; disposition of the local
      spec - non-null; register spec representing the variable
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(LocalList.Entry other)
      Compares by (in priority order) address, end then start disposition (variants of end are all consistered equivalent), and spec.
      Specified by:
      compareTo in interface Comparable<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

      public LocalList.Disposition getDisposition()
      Gets the disposition.
      Returns:
      non-null; the disposition
    • isStart

      public boolean isStart()
      Gets whether this is a local start. This is just shorthand for getDisposition() == Disposition.START.
      Returns:
      true iff this is a start
    • getName

      public CstString getName()
      Gets the variable name.
      Returns:
      null-ok; the variable name
    • getSignature

      public CstString getSignature()
      Gets the variable signature.
      Returns:
      null-ok; the variable signature
    • getType

      public CstType 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

      public RegisterSpec getRegisterSpec()
      Gets the RegisterSpec of the register holding the variable.
      Returns:
      non-null; RegisterSpec of the holding register.
    • matches

      public boolean matches(RegisterSpec otherSpec)
      Returns whether or not this instance matches the given spec.
      Parameters:
      otherSpec - non-null; the spec in question
      Returns:
      true iff this instance matches spec
    • matches

      public boolean matches(LocalList.Entry other)
      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 matches other
    • withDisposition

      public LocalList.Entry withDisposition(LocalList.Disposition disposition)
      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