Package org.eclipse.emf.ecp.view.edapt
Class PackageDependencyGraph
- java.lang.Object
-
- org.eclipse.emf.ecp.view.edapt.PackageDependencyGraph
-
public class PackageDependencyGraph extends java.lang.Object
Tree like datastructure representing EPackages and their dependencies to each other. Offers an Iterator to navigate over the dependencies.- Author:
- jfaltermeier
-
-
Constructor Summary
Constructors Constructor Description PackageDependencyGraph()
Constructs a new emptyPackageDependencyGraph
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPackage(java.lang.String nsURI)
Adds a newEPackage
with the given namespace URI to the tree.java.util.Iterator<java.util.Set<java.lang.String>>
getIerator()
Returns an iterator for the tree.
-
-
-
Constructor Detail
-
PackageDependencyGraph
public PackageDependencyGraph()
Constructs a new emptyPackageDependencyGraph
.
-
-
Method Detail
-
addPackage
public void addPackage(java.lang.String nsURI)
Adds a newEPackage
with the given namespace URI to the tree. All required dependencies of the EPackage will be registered as well.- Parameters:
nsURI
- the namespace uri of the package to add
-
getIerator
public java.util.Iterator<java.util.Set<java.lang.String>> getIerator()
Returns an iterator for the tree. It will return sets of namespace uris. The set that is returned by next will always have no unvisited parents, meaning that all parents have been returned by next before.- Returns:
- the iterator
-
-