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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalled before the scanner enters an elemententer(CtTypeReference<?> typeRef, boolean isClass) Called before the scanner enters an typevoidThis method is called after the element and all its children have been visited.voidexit(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, waitMethods inherited from interface spoon.reflect.visitor.chain.CtScannerListener
enter, exit
-
Constructor Details
-
DistinctTypeListener
-
-
Method Details
-
enter
Description copied from interface:CtScannerListenerCalled before the scanner enters an element- Specified by:
enterin interfaceCtScannerListener- Parameters:
element- the element about to be scanned.- Returns:
- a
ScanningModethat drives how the scanner processes this element and its children. For instance, returningScanningMode.SKIP_ALLcauses that element and all children to be skipped andCtScannerListener.exit(CtElement)are be NOT called for that element.
-
exit
Description copied from interface:CtScannerListenerThis 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:
exitin 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
ScanningModethat drives how the scanner processes this element and its children. For instance, returningScanningMode.SKIP_ALLcauses 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
-