com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement |
![]() |
Base interface for C AST elements.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void | addPhysicalOffset(Long offset) | ||||||||||
abstract void | addPhysicalOffsets(Collection<Long> offsets) | ||||||||||
abstract ICElement |
duplicate()
Deep duplication of the element.
| ||||||||||
abstract Long | evaluate(CMethodState state, CEnvironment environment) | ||||||||||
abstract String |
format()
Generate a full-form text version of this element.
| ||||||||||
abstract void |
generate(COutputSink out)
Generate the visual representation of the AST element.
| ||||||||||
abstract Object |
getData(Object key)
Retrieve a piece of data attached to this 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<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 void |
setData(String key, Object value)
Attach a piece of data to this AST element.
| ||||||||||
abstract void | setPhysicalOffsets(Collection<Long> offsets) | ||||||||||
abstract String |
toString()
Generate a short-form text version of this element.
| ||||||||||
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.
| ||||||||||
abstract boolean |
visitDepthPost(ICVisitor visitor, ICElement parent)
Depth-first search, post-order visit of an expression tree or sub-tree.
|
Deep duplication of the element. Sub-elements are duplicated.
Note: ICClass
, ICMethod
, ICField
, ICIdentifier
,
ICConstant
, ICType
and ICLabel
are not duplicated.
state | input state, can be updated |
---|
Generate a full-form text version of this element.
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. |
---|
Retrieve a piece of data attached to this AST element.
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 |
Attach a piece of data to this AST element.
Generate a short-form text version of this 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 |
---|