Package ghidra.app.decompiler.parallel
Class DecompilerCallback<R>
- java.lang.Object
-
- ghidra.app.decompiler.parallel.DecompilerCallback<R>
-
- Type Parameters:
R- the return type
public abstract class DecompilerCallback<R> extends java.lang.Object implements QCallback<Function,R>
An implementation ofQCallbackthat performs the management of theDecompInterfaceinstances using a Pool.Clients will get a chance to configure each newly created decompiler via the passed-in
DecompileConfigurer.Clients must implement
process(DecompileResults, TaskMonitor), which will be called for each function that is decompiled.
-
-
Constructor Summary
Constructors Constructor Description DecompilerCallback(Program program, DecompileConfigurer configurer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddispose()Call this when all work is done so that the pooled decompilers can be disposedabstract Rprocess(DecompileResults results, TaskMonitor monitor)This is called when a function is decompiled.Rprocess(Function f, TaskMonitor monitor)Processes the given item in background thread provided by a GThreadPool.voidsetTimeout(int timeoutSecs)Sets the timeout for each decompile
-
-
-
Constructor Detail
-
DecompilerCallback
public DecompilerCallback(Program program, DecompileConfigurer configurer)
-
-
Method Detail
-
process
public abstract R process(DecompileResults results, TaskMonitor monitor) throws java.lang.Exception
This is called when a function is decompiled.- Parameters:
results- the decompiled resultsmonitor- the task monitor- Returns:
- the client result
- Throws:
java.lang.Exception- if there is any issue processing the given results
-
process
public R process(Function f, TaskMonitor monitor) throws java.lang.Exception
Description copied from interface:QCallbackProcesses the given item in background thread provided by a GThreadPool.
-
setTimeout
public void setTimeout(int timeoutSecs)
Sets the timeout for each decompile- Parameters:
timeoutSecs- the timeout in seconds
-
dispose
public void dispose()
Call this when all work is done so that the pooled decompilers can be disposed
-
-