Class AbstractDPatternOptimizer

All Implemented Interfaces:
IPlugin, IDOptimizer

public abstract class AbstractDPatternOptimizer extends AbstractDOptimizer
Base class for dexdec (DEX decompiler) IR pattern match-and-replace plugins.
  • Constructor Details

    • AbstractDPatternOptimizer

      public AbstractDPatternOptimizer()
  • Method Details

    • getPatterns

      protected abstract Collection<DPatternCompiler.DPattern> getPatterns()
    • perform

      public int perform()
      Description copied from class: AbstractDOptimizer
      An optimizer must implement this method. This method is called by a master optimizer to perform the optimization on the selected target.

      Note that the optimizer is responsible for returning a legal method context, e.g.: the method IR instructions must be consistent with the CFG; the CFG must adhere to certain rules (see cleanGraph); if the data flow analysis is no longer valid, it should be invalidated (see resetDFA); etc.

      Specified by:
      perform in class AbstractDOptimizer
      Returns:
      the number of optimizations performed, 0 if none