import org.wamblee.system.graph.Visitor;
/**
- * Visitor that checks externally provided
- * <ul>
- * <li>
- * </ul>
+ * Visitor that checks whether all externally provided interfaces are actually provided
+ * by any of the internal components.
*
* @author Erik Brakkee
*
*/
public class CheckExternallyProvidedVisitor implements Visitor {
- private Graph _graph;
-
+ private Graph graph;
+
+ /**
+ * Constructs the visitor.
+ * @param aGraph Component graph.
+ */
public CheckExternallyProvidedVisitor(Graph aGraph) {
- _graph = aGraph;
+ graph = aGraph;
}
@Override
public void visitNode(Node aNode) {
if ( aNode instanceof ExternalProvidedInterfaceNode) {
ExternalProvidedInterfaceNode provided = (ExternalProvidedInterfaceNode) aNode;
- List<Edge> edges = _graph.findOutgoing(provided);
+ List<Edge> edges = graph.findOutgoing(provided);
if ( edges.size() > 2 ) {
createDuplicateException("External provided interfaces has multiple internal matches", aNode, edges);
}