Class ByteCatchList.Item

java.lang.Object
com.android.dx.cf.code.ByteCatchList.Item
Enclosing class:
ByteCatchList

public static class ByteCatchList.Item extends Object
Item in an exception handler list.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Item(int startPc, int endPc, int handlerPc, CstType exceptionClass)
    Constructs an instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    covers(int pc)
    Returns whether the given address is in the range of this item.
    int
    Gets the end pc (exclusive) of the handler's range.
    Gets the class of exception handled.
    int
    Gets the pc of the exception handler.
    int
    Gets the start pc (inclusive) of the handler's range.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Item

      public Item(int startPc, int endPc, int handlerPc, CstType exceptionClass)
      Constructs an instance.
      Parameters:
      startPc - >= 0; the start pc (inclusive) of the handler's range
      endPc - >= startPc; the end pc (exclusive) of the handler's range
      handlerPc - >= 0; the pc of the exception handler
      exceptionClass - null-ok; the exception class or null to catch all exceptions with this handler
  • Method Details

    • getStartPc

      public int getStartPc()
      Gets the start pc (inclusive) of the handler's range.
      Returns:
      >= 0; the start pc (inclusive) of the handler's range.
    • getEndPc

      public int getEndPc()
      Gets the end pc (exclusive) of the handler's range.
      Returns:
      >= startPc; the end pc (exclusive) of the handler's range.
    • getHandlerPc

      public int getHandlerPc()
      Gets the pc of the exception handler.
      Returns:
      >= 0; the pc of the exception handler
    • getExceptionClass

      public CstType getExceptionClass()
      Gets the class of exception handled.
      Returns:
      non-null; the exception class; CstType.OBJECT if this entry handles all possible exceptions
    • covers

      public boolean covers(int pc)
      Returns whether the given address is in the range of this item.
      Parameters:
      pc - the address
      Returns:
      true iff this item covers pc