From: erik Date: Tue, 13 May 2008 22:24:43 +0000 (+0000) Subject: Moving around a lot of files to work towards production components. X-Git-Tag: wamblee-utils-0.2@603~139 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=c7cc6ba1f9b467d04f213618ae962c890916cf21;p=utils Moving around a lot of files to work towards production components. --- diff --git a/trunk/system/general/src/main/java/org/wamblee/system/core/Container.java b/trunk/system/general/src/main/java/org/wamblee/system/core/Container.java index 8075abab..a0130f7c 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/core/Container.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/core/Container.java @@ -25,6 +25,8 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wamblee.collections.CollectionFilter; +import org.wamblee.conditions.Condition; import org.wamblee.general.Pair; /** @@ -40,9 +42,8 @@ public class Container extends AbstractComponent { private Set _componentNames; private CompositeInterfaceRestriction _restriction; private boolean _sealed; - - - public static ProvidedInterface[] filterProvidedServices( + + static ProvidedInterface[] filterProvidedServices( Component aClient, RequiredInterface aRequired, Collection> aProvided, InterfaceRestriction aRestriction) { List result = new ArrayList(); diff --git a/trunk/system/general/src/main/java/org/wamblee/system/core/RequiredInterface.java b/trunk/system/general/src/main/java/org/wamblee/system/core/RequiredInterface.java index d3a4e522..7f7fc348 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/core/RequiredInterface.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/core/RequiredInterface.java @@ -45,5 +45,5 @@ public interface RequiredInterface { * Gets the provider interface. * @return Provider or null if not set. */ - ProvidedInterface getProvider(); + ProvidedInterface getProvider(); } diff --git a/trunk/system/general/src/test/java/org/wamblee/system/core/DefaultRequiredInterfaceTest.java b/trunk/system/general/src/test/java/org/wamblee/system/core/DefaultRequiredInterfaceTest.java index 1c56070c..972897cc 100644 --- a/trunk/system/general/src/test/java/org/wamblee/system/core/DefaultRequiredInterfaceTest.java +++ b/trunk/system/general/src/test/java/org/wamblee/system/core/DefaultRequiredInterfaceTest.java @@ -38,4 +38,13 @@ public class DefaultRequiredInterfaceTest extends TestCase { new DefaultRequiredInterface("a", new Class[]{ String.class, Integer.class}))); } + + public void testCopy() { + DefaultRequiredInterface required = new DefaultRequiredInterface("a", new Class[]{ String.class, Integer.class}, true); + RequiredInterface copy = required.copy(); + assertTrue(copy instanceof DefaultRequiredInterface); + assertEquals(required.getName(), copy.getName()); + assertEquals(required.isOptional(), copy.isOptional()); + assertEquals(required.toString(), copy.toString()); + } }