Class CatchStructs

java.lang.Object
com.android.dx.dex.file.CatchStructs

public final class CatchStructs extends Object
List of exception handlers (tuples of covered range, catch type, handler address) for a particular piece of code. Instances of this class correspond to a try_item[] and a catch_handler_item[].
  • Constructor Details

    • CatchStructs

      public CatchStructs(DalvCode code)
      Constructs an instance.
      Parameters:
      code - non-null; code that contains the catches
  • Method Details

    • triesSize

      public int triesSize()
      Gets the size of the tries list, in entries.
      Returns:
      >= 0; the tries list size
    • debugPrint

      public void debugPrint(PrintWriter out, String prefix)
      Does a human-friendly dump of this instance.
      Parameters:
      out - non-null; where to dump
      prefix - non-null; prefix to attach to each line of output
    • encode

      public void encode(DexFile file)
      Encodes the handler lists.
      Parameters:
      file - non-null; file this instance is part of
    • writeSize

      public int writeSize()
      Gets the write size of this instance, in bytes.
      Returns:
      >= 0; the write size
    • writeTo

      public void writeTo(DexFile file, AnnotatedOutput out)
      Writes this instance to the given stream.
      Parameters:
      file - non-null; file this instance is part of
      out - non-null; where to write to