Interface HierarcyTraversalStrategy

  • All Known Implementing Classes:
    SingleInheritanceTraversalStrategy

    public interface HierarcyTraversalStrategy
    A strategy for traversing hierarchies of CompilationUnit 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 different traverse(Statement, CompilationUnit) implementation that yields an iterable containing (or generating on-the-fly) CompilationUnits in the order they should be visited.
    • 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 requested
        start - the unit where the traversal should start
        Returns:
        an iterable that contains the units in order in which they must be visited