X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fgraph%2Fcomponent%2FConnectExternalProvidedProvidedFilter.java;h=92ba1d11dc691cc9d25a826b5ff16e345e14c489;hb=49ce7cb8387601982d5e6ef186ce206d38f6e3d7;hp=01c316a0c161e847c015a2bd0d0ab919503c75dd;hpb=ddd261f331280640c5b53c7128230b629ebcd268;p=utils diff --git a/system/general/src/main/java/org/wamblee/system/graph/component/ConnectExternalProvidedProvidedFilter.java b/system/general/src/main/java/org/wamblee/system/graph/component/ConnectExternalProvidedProvidedFilter.java index 01c316a0..92ba1d11 100644 --- a/system/general/src/main/java/org/wamblee/system/graph/component/ConnectExternalProvidedProvidedFilter.java +++ b/system/general/src/main/java/org/wamblee/system/graph/component/ConnectExternalProvidedProvidedFilter.java @@ -1,12 +1,12 @@ /* - * 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. @@ -18,41 +18,28 @@ package org.wamblee.system.graph.component; import org.wamblee.system.graph.Edge; import org.wamblee.system.graph.EdgeFilter; - /** - * Filter used to explicitly connect required and provided interfaces - * within a container. - * + * Filter used to explicitly connect required and provided interfaces within a + * container. + * * @author Erik Brakkee */ public class ConnectExternalProvidedProvidedFilter implements EdgeFilter { - /** - * DOCUMENT ME! - */ private String externalProvided; - /** - * DOCUMENT ME! - */ private String component; - /** - * DOCUMENT ME! - */ private String provided; /** * Creates a new ConnectExternalProvidedProvidedFilter object. - * - * @param aExternalProvided DOCUMENT ME! - * @param aComponent DOCUMENT ME! - * @param aProvided DOCUMENT ME! + * */ public ConnectExternalProvidedProvidedFilter(String aExternalProvided, String aComponent, String aProvided) { - externalProvided = aExternalProvided; - component = aComponent; - provided = aProvided; + externalProvided = aExternalProvided; + component = aComponent; + provided = aProvided; if (externalProvided == null) { throw new IllegalArgumentException( @@ -70,17 +57,10 @@ public class ConnectExternalProvidedProvidedFilter implements EdgeFilter { } } - /** - * DOCUMENT ME! - * - * @param aEdge DOCUMENT ME! - * - * @return DOCUMENT ME! - */ @Override public boolean isViolated(Edge aEdge) { - if (aEdge.getFrom() instanceof ExternalProvidedInterfaceNode - && aEdge.getTo() instanceof ProvidedInterfaceNode) { + if (aEdge.getFrom() instanceof ExternalProvidedInterfaceNode && + aEdge.getTo() instanceof ProvidedInterfaceNode) { return isViolated((ExternalProvidedInterfaceNode) aEdge.getFrom(), (ProvidedInterfaceNode) aEdge.getTo()); } @@ -88,23 +68,15 @@ public class ConnectExternalProvidedProvidedFilter implements EdgeFilter { return false; } - /** - * DOCUMENT ME! - * - * @param aFrom DOCUMENT ME! - * @param aTo DOCUMENT ME! - * - * @return DOCUMENT ME! - */ private boolean isViolated(ExternalProvidedInterfaceNode aFrom, ProvidedInterfaceNode aTo) { if (!aFrom.getName().equals(externalProvided)) { return false; // wrong provided interface. } - if (aTo.getComponent().getName().equals(component) - && aTo.getProvided().getName().equals(provided)) { - return false; // ok + if (aTo.getComponent().getName().equals(component) && + aTo.getProvided().getName().equals(provided)) { + return false; // ok } return true;