Class EncodedMember

java.lang.Object
com.android.dx.dex.file.EncodedMember
All Implemented Interfaces:
ToHuman
Direct Known Subclasses:
EncodedField, EncodedMethod

public abstract class EncodedMember extends Object implements ToHuman
Representation of a member (field or method) of a class, for the purposes of encoding it inside a ClassDataItem.
  • Constructor Details

    • EncodedMember

      public EncodedMember(int accessFlags)
      Constructs an instance.
      Parameters:
      accessFlags - access flags for the member
  • Method Details

    • getAccessFlags

      public final int getAccessFlags()
      Gets the access flags.
      Returns:
      the access flags
    • getName

      public abstract CstString getName()
      Gets the name.
      Returns:
      non-null; the name
    • debugPrint

      public abstract void debugPrint(PrintWriter out, boolean verbose)
      Does a human-friendly dump of this instance.
      Parameters:
      out - non-null; where to dump
      verbose - whether to be verbose with the output
    • addContents

      public abstract void addContents(DexFile file)
      Populates a DexFile with items from within this instance.
      Parameters:
      file - non-null; the file to populate
    • encode

      public abstract int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq)
      Encodes this instance to the given output.
      Parameters:
      file - non-null; file this instance is part of
      out - non-null; where to write to
      lastIndex - >= 0; the previous member index value encoded, or 0 if this is the first element to encode
      dumpSeq - >= 0; sequence number of this instance for annotation purposes
      Returns:
      >= 0; the member index value that was encoded