Class CstArray

java.lang.Object
com.android.dx.rop.cst.Constant
com.android.dx.rop.cst.CstArray
All Implemented Interfaces:
ToHuman, Comparable<Constant>
Direct Known Subclasses:
CstCallSite

public class CstArray extends Constant
Constant type to represent a fixed array of other constants.
  • Constructor Details

    • CstArray

      public CstArray(CstArray.List list)
      Constructs an instance.
      Parameters:
      list - non-null; the actual list of contents
  • Method Details

    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo0

      protected int compareTo0(Constant other)
      Compare the values of this and another instance, which are guaranteed to be of the same class. Subclasses must implement this.
      Specified by:
      compareTo0 in class Constant
      Parameters:
      other - non-null; the instance to compare to
      Returns:
      -1, 0, or 1, as usual for a comparison
    • toString

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

      public String typeName()
      Returns the human name for the particular type of constant this instance is.
      Specified by:
      typeName in class Constant
      Returns:
      non-null; the name
    • isCategory2

      public boolean isCategory2()
      Returns true if this instance is a category-2 constant, meaning it takes up two slots in the constant pool, or false if this instance is category-1.
      Specified by:
      isCategory2 in class Constant
      Returns:
      true iff this instance is category-2
    • toHuman

      public String toHuman()
      Return the "human" string form of this instance. This is generally less "debuggy" than toString().
      Returns:
      non-null; the human string form
    • getList

      public CstArray.List getList()
      Get the underlying list.
      Returns:
      non-null; the list