com.android.dx.dex.code
Class StdCatchBuilder

java.lang.Object
  extended by com.android.dx.dex.code.StdCatchBuilder
All Implemented Interfaces:
CatchBuilder

public final class StdCatchBuilder
extends Object
implements CatchBuilder

Constructor of CatchTable instances from RopMethod and associated data.


Constructor Summary
StdCatchBuilder(RopMethod method, int[] order, BlockAddresses addresses)
          Constructs an instance.
 
Method Summary
 CatchTable build()
          Builds and returns the catch table for this instance.
static CatchTable build(RopMethod method, int[] order, BlockAddresses addresses)
          Builds and returns the catch table for a given method.
 HashSet<Type> getCatchTypes()
          Gets the set of catch types associated with this instance.
 boolean hasAnyCatches()
          Gets whether this instance has any catches at all (either typed or catch-all).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdCatchBuilder

public StdCatchBuilder(RopMethod method,
                       int[] order,
                       BlockAddresses addresses)
Constructs an instance. It merely holds onto its parameters for a subsequent call to build().

Parameters:
method - non-null; method to build the list for
order - non-null; block output order
addresses - non-null; address objects for each block
Method Detail

build

public CatchTable build()
Builds and returns the catch table for this instance.

Specified by:
build in interface CatchBuilder
Returns:
non-null; the constructed table

hasAnyCatches

public boolean hasAnyCatches()
Gets whether this instance has any catches at all (either typed or catch-all).

Specified by:
hasAnyCatches in interface CatchBuilder
Returns:
whether this instance has any catches at all

getCatchTypes

public HashSet<Type> getCatchTypes()
Gets the set of catch types associated with this instance.

Specified by:
getCatchTypes in interface CatchBuilder
Returns:
non-null; the set of catch types

build

public static CatchTable build(RopMethod method,
                               int[] order,
                               BlockAddresses addresses)
Builds and returns the catch table for a given method.

Parameters:
method - non-null; method to build the list for
order - non-null; block output order
addresses - non-null; address objects for each block
Returns:
non-null; the constructed table


Copyright © 2013. All Rights Reserved.