Class SingleInheritanceTraversalStrategy
- java.lang.Object
-
- it.unive.lisa.program.language.hierarchytraversal.SingleInheritanceTraversalStrategy
-
- All Implemented Interfaces:
HierarcyTraversalStrategy
public class SingleInheritanceTraversalStrategy extends java.lang.Object implements HierarcyTraversalStrategy
AHierarcyTraversalStrategy
that assumes a single super unit per each unit (Java-like).
-
-
Field Summary
Fields Modifier and Type Field Description static SingleInheritanceTraversalStrategy
INSTANCE
The singleton instance of this class.
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
INSTANCE
public static final SingleInheritanceTraversalStrategy INSTANCE
The singleton instance of this class.
-
-
Method Detail
-
traverse
public java.lang.Iterable<CompilationUnit> traverse(Statement st, CompilationUnit start)
Description copied from interface:HierarcyTraversalStrategy
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.- Specified by:
traverse
in interfaceHierarcyTraversalStrategy
- 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
-
-