Class CallSiteIdItem

All Implemented Interfaces:
Comparable<CallSiteIdItem>

public final class CallSiteIdItem extends IndexedItem implements Comparable<CallSiteIdItem>
Representation of a call site reference in a DEX file.
  • Constructor Details

    • CallSiteIdItem

      public CallSiteIdItem(CstCallSiteRef invokeDynamicRef)
      Constructs an instance.
      Parameters:
      invokeDynamicRef - non-null; The call site to represent in the DEX file.
  • Method Details

    • itemType

      public ItemType itemType()
      Returns the item type for this instance.
      Specified by:
      itemType in class Item
      Returns:
      non-null; the item type
    • writeSize

      public int writeSize()
      Gets the size of this instance when written, in bytes.
      Specified by:
      writeSize in class Item
      Returns:
      >= 0; the write size
    • addContents

      public void addContents(DexFile file)
      Populates a DexFile with items from within this instance. This will not add an item to the file for this instance itself (which should have been done by whatever refers to this instance).

      Note: Subclasses must override this to do something appropriate.

      Specified by:
      addContents in class Item
      Parameters:
      file - non-null; the file to populate
    • writeTo

      public void writeTo(DexFile file, AnnotatedOutput out)
      Writes the representation of this instance to the given data section, using the given DexFile to look things up as needed. If this instance keeps track of its offset, then this method will note the written offset and will also throw an exception if this instance has already been written.
      Specified by:
      writeTo in class Item
      Parameters:
      file - non-null; the file to use for reference
      out - non-null; where to write to
    • compareTo

      public int compareTo(CallSiteIdItem other)
      Specified by:
      compareTo in interface Comparable<CallSiteIdItem>