Package spoon.reflect.visitor.filter
Class SuperInheritanceHierarchyFunction.DistinctTypeListener
java.lang.Object
spoon.reflect.visitor.filter.SuperInheritanceHierarchyFunction.DistinctTypeListener
- All Implemented Interfaces:
CtScannerListener
- Enclosing class:
- SuperInheritanceHierarchyFunction
Implementation of
CtScannerListener
,
which is used to assure that each interface is visited only once.
It can be extended to implement more powerful listener-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCalled before the scanner enters an elemententer(CtTypeReference<?> typeRef, boolean isClass)
Called before the scanner enters an typevoid
This method is called after the element and all its children have been visited.void
exit(CtTypeReference<?> typeRef, boolean isClass)
This method is called after the element and all its children have been visited.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface spoon.reflect.visitor.chain.CtScannerListener
enter, exit
-
Constructor Details
-
DistinctTypeListener
-
-
Method Details
-
enter
Description copied from interface:CtScannerListener
Called before the scanner enters an element- Specified by:
enter
in interfaceCtScannerListener
- 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 andCtScannerListener.exit(CtElement)
are be NOT called for that element.
-
exit
Description copied from interface:CtScannerListener
This method is called after the element and all its children have been visited. This method is NOT called if an exception is thrown inCtScannerListener.enter(CtElement)
or during the scanning of the element or any of its children element. This method is NOT called for an element for whichCtScannerListener.enter(CtElement)
returnedScanningMode.SKIP_ALL
.- Specified by:
exit
in interfaceCtScannerListener
- Parameters:
element
- the element that has just been scanned.
-
enter
Called before the scanner enters an type- Parameters:
typeRef
- the type reference to be scanned.isClass
- true if type reference refers to class, false if it is an interface- 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 andCtScannerListener.exit(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 inCtScannerListener.enter(CtElement)
or during the scanning of the element or any of its children element. This method is NOT called for an element for whichCtScannerListener.enter(CtElement)
returnedScanningMode.SKIP_ALL
.- Parameters:
typeRef
- the type reference that has just been scanned.isClass
- true if type reference refers to class, false if it is an interface
-