/*
- * Copyright 2008 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- */
+ */
package org.wamblee.system.graph.component;
import org.wamblee.system.graph.DefaultEdge;
import java.util.ArrayList;
import java.util.List;
-
/**
* Factory that creates edges between required and provided interfaces.
* Speciflcally it creates:
- * <ul>
- * <li>Edges between provided and required interfaces of a
- * container.</li>
- * <li>Edges between required and externally required interfaces</li>
- * <li>Edges between externally provided and provided interfaces.
- * </ul>
- *
+ * <ul>
+ * <li>Edges between provided and required interfaces of a container.</li>
+ * <li>Edges between required and externally required interfaces</li>
+ * <li>Edges between externally provided and provided interfaces.
+ * </ul>
+ *
* @author Erik Brakkee
*/
public class RequiredProvidedEdgeFactory implements EdgeFactory {
// Empty.
}
- /**
- * DOCUMENT ME!
- *
- * @param aFrom DOCUMENT ME!
- * @param aTo DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
@Override
public List<Edge> create(Node aFrom, Node aTo) {
List<Edge> result = new ArrayList<Edge>();
if (aTo instanceof ProvidedInterfaceNode) {
ProvidedInterfaceNode provided = (ProvidedInterfaceNode) aTo;
- if (required.getRequired().implementedBy(provided.getProvided())) {
+ if (required.getRequired()
+ .implementedBy(provided.getProvided())) {
result.add(new DefaultEdge(required, provided));
}
} else if (aTo instanceof ExternalRequiredInterfaceNode) {