com.pnfsoftware.jeb.core.units.code.IDecompilerUnit |
Known Indirect Subclasses
|
Generic interface for decompilers.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FLAG_BATCH_DECOMPILATION | This indicative flag is to let the decompiler know that the current decompilation is part of a batch decompilation. | |||||||||
int | FLAG_KEEP_IR | This indicative flag is to let the decompiler know that the intermediate representation shall be kept. | |||||||||
int | FLAG_NO_CONCURRENT_DECOMPILATION | Restrictive flag: if the decompiler supports concurrent decompilations (multi-threading), setting this flag requests it to disable it and perform serial decompilations. | |||||||||
int | FLAG_NO_DEFERRED_DECOMPILATION | Restrictive flag: disallow deferred decompilations. | |||||||||
int | FLAG_NO_INNER_DECOMPILATION | Restrictive flag: shallow decompilation (eg, a request to decompile a method would not decompile inner items contained within the method). | |||||||||
int | FLAG_NO_METHOD_AST_GENERATION | Special flag indicating that the final stage of a method decompilation (the generation and optimization of its abstract syntax tree) shall be skipped. | |||||||||
int | FLAG_STANDALONE_IR_CONVERSION | Indicate that the decompiler should perform a fresh decompilation up to the
IR_CONVERSION stage (regardless of the provided
user-requested stage). |
|||||||||
int | FLAG_TEMP_FORCED_REDECOMPILATIONS | Special flag indicating that already decompiled methods should be temporarily redecompiled. | |||||||||
String | propnameListOfDisabledExternalPlugins |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
canDecompile(String identifier)
Determine if a decompilation at the provided identifier/address has a chance to succeed.
| ||||||||||
abstract boolean |
canPerformConcurrentDecompilations()
Determine whether this decompiler can perform decompilations concurrently.
| ||||||||||
abstract boolean |
decompile(Collection<String> identifiers, DecompilationContext ctx)
Decompile multiple items.
| ||||||||||
abstract ISourceUnit |
decompile(String identifier)
This method is deprecated.
use
decompileToUnit(String) .
| ||||||||||
abstract boolean |
decompileAll(DecompilationContext ctx)
Decompile everything meaningful.
| ||||||||||
abstract boolean |
decompileAllClasses(DecompilationContext ctx)
Decompile all classes.
| ||||||||||
abstract boolean |
decompileAllMethods(DecompilationContext ctx)
Decompile all methods.
| ||||||||||
abstract boolean |
decompileClass(String identifier)
Decompile a class.
| ||||||||||
abstract boolean |
decompileClass(String identifier, DecompilationContext ctx)
Decompile a class.
| ||||||||||
abstract boolean |
decompileClasses(Collection<String> identifiers, DecompilationContext ctx)
Decompile a collection of classes.
| ||||||||||
abstract boolean |
decompileField(String identifier)
Decompile a field.
| ||||||||||
abstract boolean |
decompileField(String identifier, DecompilationContext ctx)
Decompile a field.
| ||||||||||
abstract boolean |
decompileMethod(String identifier, DecompilationContext ctx)
Decompile a method.
| ||||||||||
abstract boolean |
decompileMethod(String identifier)
Decompile a method.
| ||||||||||
abstract boolean |
decompileMethods(Collection<String> identifiers, DecompilationContext ctx)
Decompile a collection of methods.
| ||||||||||
abstract ISourceUnit |
decompileToUnit(String identifier, DecompilationContext ctx)
Retrieve a decompiled unit or perform a decompilation.
| ||||||||||
abstract ISourceUnit |
decompileToUnit(String identifier)
Retrieve a decompiled unit or perform a decompilation.
| ||||||||||
abstract ICodeUnit |
getCodeUnit()
Get the code unit (possibly the parent, possibly null) that is providing the low-level data
to this decompiler.
| ||||||||||
abstract String |
getDecompiledClassText(String identifier)
Retrieve the decompiled source for the provided class.
| ||||||||||
abstract String |
getDecompiledFieldText(String identifier)
Retrieve the decompiled source for the provided field.
| ||||||||||
abstract String |
getDecompiledMethodText(String identifier)
Retrieve the decompiled source for the provided method.
| ||||||||||
abstract String |
getDecompiledText(String identifier)
Retrieve the decompiled source for the provided item.
| ||||||||||
abstract ISourceUnit |
getDecompiledUnit(String identifier)
Retrieve the unit representing the decompiled entity at the provided identifier/address.
| ||||||||||
abstract DecompilerExporter |
getExporter()
Convenience method used to create an exporter object used to decompile and export some or all
potentially decompilable to source files on disk.
| ||||||||||
abstract List<String> |
getInferredTypes(String msig, int moff, int varindex)
This method is deprecated.
do not use
| ||||||||||
abstract DecompilerOutputType |
getOutputType()
Get the type of output produced by this decompiler.
| ||||||||||
abstract int |
getThreadPoolSize()
Set the maximum number of threads to be used when decompiling multiple items concurrently.
| ||||||||||
abstract void |
removeAllDecompilations()
Remove all decompilations.
| ||||||||||
abstract void |
removeDecompilation(String identifier)
Remove a decompilation.
| ||||||||||
abstract void |
removeFreeElements()
Remove all decompilation objects that exist but are not directly or indirectly managed by an
existing decompiled source unit.
| ||||||||||
abstract void |
resetAllDecompilations()
Reset all decompilations.
| ||||||||||
abstract void |
resetDecompilation(String identifier)
Reset a decompilation.
| ||||||||||
abstract void |
runGarbageCollection()
This method instructs the decompiler to perform garbage collection.
| ||||||||||
abstract void |
setThreadPoolSize(int threadPoolSize)
Get the maximum number of threads to be used when decompiling multiple items concurrently.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.pnfsoftware.jeb.core.IUnitCreator
| |||||||||||
From interface
com.pnfsoftware.jeb.core.IUserDataSupport
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.IAddressableUnit
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.IInteractiveUnit
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.IUnit
| |||||||||||
From interface
com.pnfsoftware.jeb.util.events.IEventSource
|
This indicative flag is to let the decompiler know that the current decompilation is part of a batch decompilation. This flag may be provided to internal components, that may change their behavior when it is set.
A decompiler may ignore this flag.
This indicative flag is to let the decompiler know that the intermediate representation shall be kept.
A decompiler may not be able to honor this flag.
Restrictive flag: if the decompiler supports concurrent decompilations (multi-threading), setting this flag requests it to disable it and perform serial decompilations.
A decompiler may choose to ignore this flag.
Restrictive flag: disallow deferred decompilations. Deferred decompilations are decompilations of additional items, that usually take place after the main request has completed or partially completed, in order to provide better output.
A decompiler may choose to ignore this flag.
Restrictive flag: shallow decompilation (eg, a request to decompile a method would not decompile inner items contained within the method).
A decompiler may choose to ignore this flag.
Special flag indicating that the final stage of a method decompilation (the generation and optimization of its abstract syntax tree) shall be skipped.
By using this flags, these other flags will be automatically set:
FLAG_NO_DEFERRED_DECOMPILATION
.
It is also recommended to use FLAG_NO_INNER_DECOMPILATION
when setting this flag.
A decompiler cannot ignore this flag.
Indicate that the decompiler should perform a fresh decompilation up to the
IR_CONVERSION
stage (regardless of the provided
user-requested stage). The decompilation will not be registered with the decompiler. In
general, this flag should be combined with FLAG_KEEP_IR
in order to examine the IR
post decompilation.
A decompiler may not be able to honor this flag.
Special flag indicating that already decompiled methods should be temporarily redecompiled. Existing decompilations will not be replaced by new ones.
By using this flags, these other flags will be automatically set:
FLAG_NO_DEFERRED_DECOMPILATION
, FLAG_NO_METHOD_AST_GENERATION
.
It is also recommended to use FLAG_NO_INNER_DECOMPILATION
when setting this flag.
A decompiler cannot ignore this flag.
Determine if a decompilation at the provided identifier/address has a chance to succeed. A positive result may result in a valid decompilation; a negative result will always result in an invalid/impossible decompilation.
Determine whether this decompiler can perform decompilations concurrently.
Decompile multiple items.
identifiers | a collection of item identifiers to be decompiled |
---|---|
ctx | optional context |
This method is deprecated.
use decompileToUnit(String)
.
DO NOT USE. Use decompileToUnit(String)
instead. Left to maintain script
compatibility.
Decompile everything meaningful.
Decompile all classes.
Decompile all methods.
Decompile a class.
identifier | class identifier |
---|
Decompile a class.
identifier | class identifier |
---|
Decompile a collection of classes.
Decompile a field.
identifier | field identifier |
---|
Decompile a field.
identifier | field identifier |
---|
Decompile a method.
identifier | method identifier |
---|
Decompile a method.
identifier | method identifier |
---|
Decompile a collection of methods.
Retrieve a decompiled unit or perform a decompilation. This is a high-level function used to
decompile and generate meaningful (to clients) source code units
. The
decompiler may normalize the identifier.
If a source unit encompassing the provided identifier address already exists, it is returned.
identifier | the identifier or address at which the decompilation should be performed |
---|---|
ctx | optional decompilation context and options |
Retrieve a decompiled unit or perform a decompilation. This is a high-level function used to decompile generate meaningful (to clients) decompiled code units. The decompiler may normalize the identifier.
identifier | the identifier or address at which the decompilation should be performed |
---|
Get the code unit (possibly the parent, possibly null) that is providing the low-level data to this decompiler.
Retrieve the decompiled source for the provided class.
identifier | class identifier |
---|
Retrieve the decompiled source for the provided field.
identifier | field identifier |
---|
Retrieve the decompiled source for the provided method.
identifier | method identifier |
---|
Retrieve the decompiled source for the provided item.
identifier | object identifier |
---|
Retrieve the unit representing the decompiled entity at the provided identifier/address. No decompilation is performed.
identifier | the identifier or address |
---|
Convenience method used to create an exporter object used to decompile and export some or all potentially decompilable to source files on disk.
This method is deprecated.
do not use
Get the type of output produced by this decompiler.
Set the maximum number of threads to be used when decompiling multiple items concurrently.
Will always return 1 if canPerformConcurrentDecompilations()
is false.
Remove all decompilations.
Remove a decompilation.
Remove all decompilation objects that exist but are not directly or indirectly managed by an existing decompiled source unit.
Reset all decompilations.
Reset a decompilation.
Note that if a source unit representing the decompiled object exists, it is not guaranteed to
be removed. It will simply be reset, making a redecompilation possible. In order to remove a
child unit of a decompiler, use removeChild(com.pnfsoftware.jeb.core.units.IUnit)
.
To do a proper removal, use removeDecompilation(String)
.
This method instructs the decompiler to perform garbage collection. It includes the actions
performed by removeFreeElements()
.
Get the maximum number of threads to be used when decompiling multiple items concurrently.
N/A if canPerformConcurrentDecompilations()
is false.