Interface ICBlock
- All Superinterfaces:
ICCompound,ICElement,ICStatement,Iterable<ICStatement>
C AST interface to represent a sequence of
statements.
Example:
{
stm0;
stm1;
stm2;
}
Statements cannot be null. An exception will be raised if an attempt to insert a null statement is made.
-
Method Summary
Modifier and TypeMethodDescriptionadd(ICStatement stm) addAll(ICStatement... stms) voidclear()Remove all statements of the block, making the block effectively empty: {}.Deep duplication of the element.voidgenerateBody(COutputSink out, boolean methodBody) Raw body generation, the caller is responsible for calling generateEnter/generateExitvoidvoidget(int index) getAll()getLast()voidinsert(int index, ICStatement stm) voidInsert all statements of a source block into this block.booleanisEmpty()remove(int index) booleanremove(ICStatement stm) Remove a statement from the block.voidset(int index, ICStatement stm) intsize()Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICCompound
generateFlatList, getBlocks, insertAt, resetMethods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement
addPhysicalOffset, addPhysicalOffsets, evaluate, format, generate, getData, getElementType, getPhysicalOffset, getPhysicalOffsets, getSubElements, replaceSubElement, setData, setPhysicalOffsets, toString, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPreMethods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement
getIntermediateOffset, setIntermediateOffsetMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
generateHeader
-
generateBody
Raw body generation, the caller is responsible for calling generateEnter/generateExit- Parameters:
out-
-
clear
void clear()Remove all statements of the block, making the block effectively empty: {}. Do not confuse this method withICCompound.reset(). -
size
int size() -
isEmpty
boolean isEmpty() -
getAll
List<ICStatement> getAll() -
get
-
getLast
ICStatement getLast() -
set
-
insert
-
insertAll
Insert all statements of a source block into this block. The source block is left untouched.- Parameters:
index- 0-based insertion index into this blocksrcblk- source block
-
add
-
addAll
-
addAll
-
remove
-
removeLast
ICStatement removeLast() -
remove
Remove a statement from the block. Does not throw if the statement is not found.- Parameters:
stm- mandatory statement- Returns:
- indicates success
-
duplicate
ICBlock duplicate()Description copied from interface:ICElementDeep duplication of the element. Sub-elements are duplicated.Note:
ICClass,ICMethod,ICField,ICIdentifier,ICConstant,ICTypeandICLabelare not duplicated.- Specified by:
duplicatein interfaceICCompound- Specified by:
duplicatein interfaceICElement- Specified by:
duplicatein interfaceICStatement
-