# Interface: com.pnfsoftware.jeb.core.units.code.IVisitResults

Visit results interface for statement trees.

## Static Field: FLAG_RECORD_PARENTS
Type: `int`

Constant value: `1`
Description: Record the parents in a stack, made available when visiting a child. Parents recording is seldom used, and disabled by default.

## Static Field: FLAG_SKIP_ASSIGN_DST
Type: `int`

Constant value: `2`
Description: Skip written \(defined\) elements. Note: the name of this flag is misleading, implementations may skip more than simply the destination of assignments.

## Method: getValue
- return type: `int`

Description: 
return: 

## Method: interrupt
- parameter: `success`, type: `boolean`

Description: Notify the visitor that the visit of the tree should be stopped.
parameter: success: the result of the visit

## Method: interrupt
- parameter: `success`, type: `boolean`
- parameter: `forcedValue`, type: `int`

Description: Notify the visitor that the visit of the tree should be stopped.
parameter: success: visit result
parameter: forcedValue: optional return value, can be retrieved via [#getValue()](#getValue())

## Method: isInterruptedVisit
- return type: `boolean`

Description: 
return: 

## Method: isVisitedSuccessfully
- return type: `boolean`

Description: 
return: 

## Method: parent
- parameter: `index`, type: `int`
- return type: `T`

Description: This convenience method returns the i'th ancestor \(i=0 being the immediate parent\) of the element. On error, the method returns null \(it never throws\).
parameter: index: parent index, negative indices are allowed \(\-1 means the highest ancestor\)
return: the requested parent or null

## Method: parentsIterator
- return type: `java.util.Iterator<T>`

Description: Optional iterator containing the parents; non\-null only if [#FLAG_RECORD_PARENTS](#FLAG_RECORD_PARENTS) was used when creating the object. The first element provided by the iterator is the parent of the currently visited element; the last element is the deepest ancestor.

## Method: setReplacedNode
- parameter: `newNode`, type: `T`

Description: Notify the visitor that the current node was replaced by the [process](INodeVisitor#process(Object, Object, IVisitResults)) method. 

 Note: usage of this method is not mandatory in a DFS post\-order traversal.
parameter: newNode: the non\-null new node

## Method: setValue
- parameter: `value`, type: `int`

Description: 
parameter: value: 

## Method: setVisitResult
- parameter: `success`, type: `boolean`

Description: Saves the visit result \(do not stop the visitor: use [#interrupt(boolean)](#interrupt(boolean)) to stop the process\)
parameter: success: 

## Method: skipChildren

Description: 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.

