Package spoon.reflect.visitor.chain
Interface CtScannerListener
- All Known Implementing Classes:
SuperInheritanceHierarchyFunction.DistinctTypeListener
public interface CtScannerListener
Responsible for performing an action when a scanner enters/exits a node while scanning the AST.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ScanningMode
Called before the scanner enters an elementdefault ScanningMode
Called before the scanner enters an elementdefault void
This method is called after the element and all its children have been visited.default void
This method is called after the element and all its children have been visited.
-
Method Details
-
enter
Called before the scanner enters an element- Parameters:
element
- the element about to be scanned.- Returns:
- a
ScanningMode
that drives how the scanner processes this element and its children. For instance, returningScanningMode.SKIP_ALL
causes that element and all children to be skipped andexit(CtElement)
are be NOT called for that element.
-
enter
Called before the scanner enters an element- Parameters:
role
- theCtRole
, which `element` has in its parent. It is null for the first scanned elementelement
- the element about to be scanned.- Returns:
- a
ScanningMode
that drives how the scanner processes this element and its children. For instance, returningScanningMode.SKIP_ALL
causes that element and all children to be skipped andexit(CtElement)
are be NOT called for that element.
-
exit
This method is called after the element and all its children have been visited. This method is NOT called if an exception is thrown inenter(CtElement)
or during the scanning of the element or any of its children element. This method is NOT called for an element for whichenter(CtElement)
returnedScanningMode.SKIP_ALL
.- Parameters:
element
- the element that has just been scanned.
-
exit
This method is called after the element and all its children have been visited. This method is NOT called if an exception is thrown inenter(CtElement)
or during the scanning of the element or any of its children element. This method is NOT called for an element for whichenter(CtElement)
returnedScanningMode.SKIP_ALL
.- Parameters:
role
- theCtRole
, which `element` has in its parent. It is null for the first scanned elementelement
- the element that has just been scanned.
-