public interface

IVisitResults

com.pnfsoftware.jeb.core.units.code.asm.decompiler.IVisitResults<T>
Known Indirect Subclasses

Class Overview

Visit results interface for statement trees.

Summary

Constants
int FLAG_RECORD_PARENTS
int FLAG_SKIP_ASSIGN_DST
Public Methods
abstract int getResultCode()
abstract void interrupt(boolean success, int code)
Notify the visitor that the visit of the tree should be stopped.
abstract void interrupt(boolean success)
Notify the visitor that the visit of the tree should be stopped.
abstract boolean isInterruptedVisit()
abstract boolean isVisitedSuccessfully()
abstract Iterator<T> parentsIterator()
optional iterator containing the parents; non-null only if FLAG_RECORD_PARENTS was used when creating the object.
abstract void setReplacedNode(T newNode)
Notify the visitor that the current node was replaced by the process method.
abstract void setVisitResult(boolean success)
Saves the visit result (do not stop the visitor: use interrupt(boolean) to stop the process)
abstract void skipChildren()
Used in DFS pre-order to notify the visitor that the children of the currently visited node should be skipped; the visitor will then proceed with the next cousin.

Constants

public static final int FLAG_RECORD_PARENTS

Constant Value: 1 (0x00000001)

public static final int FLAG_SKIP_ASSIGN_DST

Constant Value: 2 (0x00000002)

Public Methods

public abstract int getResultCode ()

public abstract void interrupt (boolean success, int code)

Notify the visitor that the visit of the tree should be stopped.

Parameters
success visit result
code optional code, can be retrieved via getResultCode()

public abstract void interrupt (boolean success)

Notify the visitor that the visit of the tree should be stopped.

Parameters
success the result of the visit

public abstract boolean isInterruptedVisit ()

public abstract boolean isVisitedSuccessfully ()

public abstract Iterator<T> parentsIterator ()

optional iterator containing the parents; non-null only if FLAG_RECORD_PARENTS was used when creating the object.

public abstract void setReplacedNode (T newNode)

Notify the visitor that the current node was replaced by the process method.

Note: usage of this method is not mandatory in a DFS post-order traversal.

Parameters
newNode the non-null new node

public abstract void setVisitResult (boolean success)

Saves the visit result (do not stop the visitor: use interrupt(boolean) to stop the process)

public abstract void skipChildren ()

Used in DFS pre-order to notify the visitor that the children of the currently visited node should be skipped; the visitor will then proceed with the next cousin.

Note: this method is useless in DFS post-order since children of a node are always processed before their parent.