Class StdCatchBuilder

java.lang.Object
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 Details

    • 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 Details

    • 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