public static class

DecompilationOptions.Builder

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.DecompilationOptions.Builder

Class Overview

Builder of decompilation options.

Summary

Public Methods
DecompilationOptions build()
Build an options object, used by the decompilation context.
DecompilationOptions.Builder flags(int flags)
Set decompilation flags.
DecompilationOptions.Builder maxTimePerMethod(Long maxTimePerMethod)
Set an optional maximum duration allowed to decompile a single method.
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.
static DecompilationOptions.Builder newInstance()
DecompilationOptions.Builder postDecompilationCallback(Consumer<String> postDecompilationCallback)
Set a post-decompilation callback.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public DecompilationOptions build ()

Build an options object, used by the decompilation context.

Returns
  • the newly built options object

public DecompilationOptions.Builder flags (int flags)

Set decompilation flags. Refer to IDecompilerUnit.FLAG_xxx.

Returns
  • this builder

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

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

public static DecompilationOptions.Builder newInstance ()

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