Interface HierarcyTraversalStrategy
-
- All Known Implementing Classes:
SingleInheritanceTraversalStrategy
public interface HierarcyTraversalStrategy
A strategy for traversing hierarchies ofCompilationUnit
to search for implementations of call targets or global implementations. Depending on the language, the order in which type hierarchies are traversed to find targets of calls and global accesses changes (e.g. languages with multiple inheritance have specific algorithms for traversing it). Each strategy comes with a differenttraverse(Statement, CompilationUnit)
implementation that yields an iterable containing (or generating on-the-fly)CompilationUnit
s in the order they should be visited.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Iterable<CompilationUnit>
traverse(Statement st, CompilationUnit start)
Yields an iterable containing (or generating on-the-fly) compilation units in the order they should be visited for traversing a type hierarchy to find targets of calls or global accesses.
-
-
-
Method Detail
-
traverse
java.lang.Iterable<CompilationUnit> traverse(Statement st, CompilationUnit start)
Yields an iterable containing (or generating on-the-fly) compilation units in the order they should be visited for traversing a type hierarchy to find targets of calls or global accesses.- Parameters:
st
- the statement for which the traversal is requestedstart
- the unit where the traversal should start- Returns:
- an iterable that contains the units in order in which they must be visited
-
-