com.android.dx.dex.file
Class CatchStructs

java.lang.Object
  extended by 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 Summary
CatchStructs(DalvCode code)
          Constructs an instance.
 
Method Summary
 void debugPrint(PrintWriter out, String prefix)
          Does a human-friendly dump of this instance.
 void encode(DexFile file)
          Encodes the handler lists.
 int triesSize()
          Gets the size of the tries list, in entries.
 int writeSize()
          Gets the write size of this instance, in bytes.
 void writeTo(DexFile file, AnnotatedOutput out)
          Writes this instance to the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatchStructs

public CatchStructs(DalvCode code)
Constructs an instance.

Parameters:
code - non-null; code that contains the catches
Method Detail

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


Copyright © 2015. All rights reserved.