Class AbstractCElementOptimizer
java.lang.Object
com.pnfsoftware.jeb.core.AbstractPlugin
com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer<ICMethod>
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCBlockOptimizer
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCElementOptimizer
- All Implemented Interfaces:
IPlugin
,ICOptimizer
,IOptimizer<ICMethod>
Specialized base optimizer for C elements. Each element contained in the AST method is provided
to
optimizeElement(ICElement, ICElement)
-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
cf, ef, g, m, of
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer
DEAD_CODE_REMOVER, DEOBFUSCATOR, PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_STANDARD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final int
Process the block.protected abstract ICElement
optimizeElement
(ICElement e, ICElement parent) Optimize an element.Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCBlockOptimizer
getNextSiblingStatement, optimizeBlock, perform, performOnMethoBlocksRecursivively
Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer
getMasterOptimizer, getMasterOptimizerSafe, performOnTarget
Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer
addTag, getName, getPluginInformation, getPreferredExecutionStage, getPriority, getRequiredModeThreshold, getTags, getType, removeTag, setMasterOptimizer, setName, setPreferredExecutionStage, setPriority, setRequiredModeThreshold, setType
Methods inherited from class com.pnfsoftware.jeb.core.AbstractPlugin
dispose, getData, setData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer
getPreferredExecutionStage, getPriority, getRequiredModeThreshold, getTags, getType, setMasterOptimizer
Methods inherited from interface com.pnfsoftware.jeb.core.IPlugin
dispose, getData, getPluginInformation, setData
-
Constructor Details
-
AbstractCElementOptimizer
public AbstractCElementOptimizer()Same asthis(false)
. -
AbstractCElementOptimizer
public AbstractCElementOptimizer(boolean innerReplacement) - Parameters:
innerReplacement
- if false,parent.replaceSubElement(elt, new_elt)
will be called after a successful optimization (optimizeElement(ICElement, ICElement)
returned non-null)
-
-
Method Details
-
optimizeBlock
Process the block. Sub-classes should not override the default implementation.- Specified by:
optimizeBlock
in classAbstractCBlockOptimizer
- Parameters:
b
- a block of statements- Returns:
- the number of optimizations done
-
optimizeElement
Optimize an element. Sub-classes must implement this method- Parameters:
e
- input element to be optimizedparent
- the parent of the input element- Returns:
- non-null if the element was optimized; null means it was not optimized (if
innerReplacement=true
was provided to the constructor, this return value, if non-null, must be the input element itself)
-