Interface ICCompound
- All Superinterfaces:
ICElement
,ICStatement
- All Known Subinterfaces:
ICBlock
,ICConditionalStatement
,ICDoWhileStm
,ICForStm
,ICGenericBreakable
,ICGenericLoop
,ICGenericWhileLoop
,ICIfStm
,ICSwitchStm
,ICWhileStm
C AST interface to represent compound statements.
Compound statements contain more statements, laid out in blocks
. A block is
the simplest type of compound. Compounds include if-conditionals, loops, switches, etc.
-
Method Summary
Modifier and TypeMethodDescriptionDeep duplication of the element.Generate a flat list of AST and pseudo-AST elements that make up this block.Retrieve the list of blocks (not elements) that are used to define that compound element.boolean
insertAt
(long target_offset, ICStatement insert_stm) Insert a statement at a particular offset within the AST.void
reset()
Reset the compound.Methods 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, visitDepthPre
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement
getIntermediateOffset, setIntermediateOffset
-
Method Details
-
getBlocks
Retrieve the list of blocks (not elements) that are used to define that compound element.- Returns:
-
insertAt
Insert a statement at a particular offset within the AST. This function recurses down the AST tree, inside the blocks, to find the exact location where the statement should be inserted.- Parameters:
target_offset
-insert_stm
-- Returns:
-
generateFlatList
List<ICStatement> generateFlatList()Generate a flat list of AST and pseudo-AST elements that make up this block. This function allows the caller to get a flat representation of the AST, much like a programmer would view a source code. Note that the statements returned can be pseudo statements, ie, they're not real statements. For example, a flat view of a conditional block would return pseudo-statements to represent the "if" line, the "else if" lines, and the "else" line.- Returns:
- a list of statements and pseudo-statements
-
reset
void reset()Reset the compound. Internal use. -
duplicate
ICCompound duplicate()Description copied from interface:ICElement
Deep duplication of the element. Sub-elements are duplicated.Note:
ICClass
,ICMethod
,ICField
,ICIdentifier
,ICConstant
,ICType
andICLabel
are not duplicated.- Specified by:
duplicate
in interfaceICElement
- Specified by:
duplicate
in interfaceICStatement
-