Class DecompilationOptions.Builder

java.lang.Object
com.pnfsoftware.jeb.core.units.code.DecompilationOptions.Builder
Enclosing class:
DecompilationOptions

public static class DecompilationOptions.Builder extends Object
Builder of decompilation options.
  • Method Details

    • newInstance

      public static DecompilationOptions.Builder newInstance()
    • flags

      public DecompilationOptions.Builder flags(int flags)
      Set decompilation flags. Refer to IDecompilerUnit.FLAG_xxx.
      Parameters:
      flags -
      Returns:
      this builder
    • maxTimePerMethod

      public DecompilationOptions.Builder maxTimePerMethod(Long maxTimePerMethod)
      Set an optional maximum duration allowed to decompile a single method. 0 means never time out.

      If left null, the decompiler's setting is used, if any (else 0 is used).

      Parameters:
      maxTimePerMethod - in milliseconds
      Returns:
      this builder
    • maxTimeTotal

      public DecompilationOptions.Builder maxTimeTotal(Long maxTimeTotal)
      When decompiling an entity or entities comprising multiple methods (eg, a class or multiple classes or collection of methods, or a whole program), this method allows setting the maximum duration allowed before returning.

      If left null, the decompiler's setting is used, if any (else 0 is used).

      Parameters:
      maxTimeTotal - in milliseconds
      Returns:
      this builder
    • postDecompilationCallback

      public DecompilationOptions.Builder postDecompilationCallback(Consumer<String> postDecompilationCallback)
      Set a post-decompilation callback. The callback is called by a decompiler after a class and its contents was decompiled. Currently, this option is honored by dexdec only (gendec disregards the option.)
      Parameters:
      postDecompilationCallback - a callback (called after a decompilation, on the decompilation thread)
      Returns:
      this builder
    • build

      public DecompilationOptions build()
      Build an options object, used by the decompilation context.
      Returns:
      the newly built options object