import org.wamblee.system.graph.Graph;
import org.wamblee.system.graph.Node;
-
-// TODO info superfluous required interfaces
-// TODO check optional external required but mandatory internal.
-
/**
* Represents a component graph and provides the bridge from the
* component model to a graph model. The graph model is easier
/**
* Constructs an empty component graph.
*/
- public ComponentGraph() {
+ public ComponentGraph() {
_restriction = new CompositeInterfaceRestriction();
}
* Adds an externally required interface of a container.
* This should be called before any components of the container are
* added.
+ * @param aComponent Component requiring the interface.
* @param aInterface Required interface.
*/
- public void addRequiredInterface(RequiredInterface aInterface) {
- addNode(new ExternalRequiredInterfaceNode(aInterface));
+ public void addRequiredInterface(Component aComponent, RequiredInterface aInterface) {
+ addNode(new ExternalRequiredInterfaceNode(aComponent, aInterface));
}
/**
* Adds an externally provided interface of a container.
- * This should be called after all components of the container have been added.
+ * This should be called after all components of the container have been added.
+ * @param aComponent Component providing the interface.
* @param aInterface Provided interface.
*/
- public void addProvidedInterface(ProvidedInterface aInterface) {
- addNode(new ExternalProvidedInterfaceNode(aInterface));
+ public void addProvidedInterface(Component aComponent, ProvidedInterface aInterface) {
+ addNode(new ExternalProvidedInterfaceNode(aComponent, aInterface));
}
/**
extend(new RequiredProvidedEdgeFactory());
accept(new ApplyRestrictionsVisitor(this, _restriction));
accept(new CheckRequiredProvidedMultiplicityVisitor(this));
- accept(new CheckExternallyRequiredVisitor());
+ accept(new CheckExternallyRequiredVisitor(this));
accept(new CheckExternallyProvidedVisitor(this));
accept(new CheckStartupDependenciesVisitor(this));
}