com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement |
![]() |
Base interface for C AST elements.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract ICElement |
duplicate()
Deep duplication of the element (i.e.
| ||||||||||
abstract void |
generate(COutputSink out)
Generate the visual representation of the AST element.
| ||||||||||
abstract CElementType |
getElementType()
This convenience method returns the type of C AST element held by this object.
| ||||||||||
abstract Long |
getPhysicalOffset()
Get the closest physical offset or address that matches this high-level pseudo-code element.
| ||||||||||
abstract Collection<Long> |
getPhysicalOffsets()
Get the physical offsets of instructions matching this AST element.
| ||||||||||
abstract List<? extends ICElement> |
getSubElements()
Get the list of AST elements that constitute this AST element.
| ||||||||||
abstract boolean |
replaceSubElement(ICElement oldElement, ICElement newElement)
Replace one element by another one.
| ||||||||||
abstract boolean |
visitDepthPost(ICVisitor visitor, ICElement parent)
Depth-first search, post-order visit of an expression tree or sub-tree.
| ||||||||||
abstract boolean |
visitDepthPost(ICVisitor visitor)
Depth-first search, post-order visit of an expression tree or sub-tree.
| ||||||||||
abstract boolean |
visitDepthPost(ICVisitor visitor, ICElement parent, CVisitResults results)
Depth-first search, post-order visit of an expression tree or sub-tree.
|
Deep duplication of the element (i.e. sub-elements are duplicated).
Note: ICClass
, ICMethod
, ICField
, ICIdentifier
,
ICConstant
, ICType
and ICLabel
are not duplicated.
Generate the visual representation of the AST element. The output is directed into a sink, that represents the current output state for the whole AST. Every AST statement must implement this method.
out | where the AST element should be generated; the sink also contains attributes indicating how the element should be generated. |
---|
This convenience method returns the type of C AST element held by this object.
Get the closest physical offset or address that matches this high-level pseudo-code element.
Get the physical offsets of instructions matching this AST element.
Get the list of AST elements that constitute this AST element. Typically, for simple statements, it may be expression. For complex expressions, it may be simpler expressions. For compound statements, it may more statements and expressions. Etc.
Be careful to manage properly possible infinite loops (in particular on recursive calls, when
sub element may be the current method). Use
isClassMethodField(ICElement)
to avoid infinite recursing or
visitDepthPost(ICVisitor)
methods.
Replace one element by another one. Only the references are compared, no equals/deep compare. At most one element is replaced.
oldElement | the element to be replaced |
---|---|
newElement | the new element |
Depth-first search, post-order visit of an expression tree or sub-tree. The node being visited may be replaced without notifying the visitor.
visitor | the visitor object |
---|
Depth-first search, post-order visit of an expression tree or sub-tree. The node being visited may be replaced without notifying the visitor.
visitor | the visitor object |
---|
Depth-first search, post-order visit of an expression tree or sub-tree. The node being visited may be replaced without notifying the visitor.
visitor | the visitor object |
---|