Class TryListBuilder.MutableTryBlock<EH extends ExceptionHandler>

java.lang.Object
org.jf.dexlib2.base.BaseTryBlock<EH>
org.jf.dexlib2.writer.util.TryListBuilder.MutableTryBlock<EH>
All Implemented Interfaces:
TryBlock<EH>
Enclosing class:
TryListBuilder<EH extends ExceptionHandler>

private static class TryListBuilder.MutableTryBlock<EH extends ExceptionHandler> extends BaseTryBlock<EH>
  • Field Details

  • Constructor Details

    • MutableTryBlock

      public MutableTryBlock(int startCodeAddress, int endCodeAddress)
    • MutableTryBlock

      public MutableTryBlock(int startCodeAddress, int endCodeAddress, @Nonnull List<EH> exceptionHandlers)
  • Method Details

    • getStartCodeAddress

      public int getStartCodeAddress()
      Description copied from interface: TryBlock
      Gets the code offset of the start of this try block. The starting location must not occur in the middle of an instruction.
      Returns:
      The offset of the start of the try block from the the beginning of the bytecode for the method. The offset will be in terms of 16-bit code units.
    • getCodeUnitCount

      public int getCodeUnitCount()
      Description copied from interface: TryBlock
      Gets the number of code units covered by this try block. The end of the try block is typically coincident with the end of an instruction, but does not strictly need to be. If the last instruction is only partly covered by this try block, it is considered to be covered.
      Returns:
      The number of code units covered by this try block.
    • getExceptionHandlers

      @Nonnull public List<EH> getExceptionHandlers()
      Description copied from interface: TryBlock
      A list of the exception handlers associated with this try block. The exception handlers in the returned list will all have a unique type, including at most 1 with no type, which is the catch-all handler. If present, the catch-all handler is always the last item in the list.
      Returns:
      A list of ExceptionHandler objects
    • split

      @Nonnull public TryListBuilder.MutableTryBlock<EH> split(int splitAddress)
    • delete

      public void delete()
    • mergeNext

      public void mergeNext()
    • append

      public void append(@Nonnull TryListBuilder.MutableTryBlock<EH> tryBlock)
    • prepend

      public void prepend(@Nonnull TryListBuilder.MutableTryBlock<EH> tryBlock)
    • addHandler

      public void addHandler(@Nonnull EH handler)