# Class: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCBlockOptimizer
- Super class: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.opt.AbstractCOptimizer`

Perform a recursive optimizer on [ICBlock](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock.md). The policy is recurse first, so optimizer is  done as post\-treatment.

## Constructor: AbstractCBlockOptimizer (no-arg)

Description: Create a block optimizer.

## Protected Method: getNextSiblingStatement
- parameter: `statementIndex`, type: `int`
- parameter: `block`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`
- parameter: `blockNextSiblingStm`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement`

Description: Retrieve the statement following a child block in its parent block.
parameter: statementIndex: index of the current statement in `block`
parameter: block: block containing the current statement
parameter: blockNextSiblingStm: next sibling statement of `block`, if any
return: the next sibling statement, or null if none exists

## Protected Abstract Method: optimizeBlock
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`
- return type: `int`

Description: Attempt to optimize CBlock. Sub\-expressions may be examined. The implementor should not  attempt to modify parent or siblings CBlocks.
parameter: b: CBlock
return: the number of optimizations done

## Protected Method: optimizeBlock
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`
- parameter: `parent`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICCompound`
- parameter: `blockNextStm`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement`
- return type: `int`

Description: Attempt to optimize CBlock, with some contextual information provided. Sub\-expressions may be  examined. The implementor should not attempt to modify parent or siblings CBlocks.
parameter: b: CBlock
parameter: parent: the parent compound statement
parameter: blockNextStm: the next statement \(i.e. the next sibling statement in the AST, not             control\-flow related\)
return: the number of optimizations done

## Protected Method: perform
- return type: `int`

Description: Can be overridden. The default implementation simply calls [#performOnMethoBlocksRecursivively()](#performOnMethoBlocksRecursivively()).
return: the number of optimizations performed

## Final Method: performOnMethoBlocksRecursivively
- return type: `int`

Description: Recursively process the method body blocks.
return: the number of optimizations performed

