felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r886302 [1/2] - in /felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver: ./ felix/ manifestparser/ prototype/
Date Wed, 02 Dec 2009 21:07:06 GMT
Author: rickhall
Date: Wed Dec  2 21:07:04 2009
New Revision: 886302

URL: http://svn.apache.org/viewvc?rev=886302&view=rev
Log:
Various renaming.

Modified:
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main2.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Module.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/RequirementImpl.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Wire.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/CandidateSet.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolverImpl.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/Main.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/prototype/ProtoResolver.java

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java Wed Dec  2 21:07:04 2009
@@ -110,34 +110,34 @@
         // Bundle A
         moduleList.add(
             target = (m = new Module("A"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("woz"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("woz"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle D
         moduleList.add(
             (m = new Module("D"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "unused")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "unused")));
         // Bundle E
         moduleList.add(
             (m = new Module("E"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz").using("dit"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "unused"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "dit")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz").using("dit"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "unused"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "dit")));
         // Bundle F
         moduleList.add(
             (m = new Module("F"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dit").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dit").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
 
         return target;
     }
@@ -151,40 +151,40 @@
         // Bundle A
         moduleList.add(
             target = (m = new Module("A"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("baz,boo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "boo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("baz,boo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "boo")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz").using("bar,dir"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "dit")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz").using("bar,dir"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "dit")));
         // Bundle D
         moduleList.add(
             (m = new Module("D"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dit").using("dot"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "dot")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dit").using("dot"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "dot")));
         // Bundle E
         moduleList.add(
             (m = new Module("E"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dot").using("woz"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dot").using("woz"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz")));
         // Bundle F
         moduleList.add(
             (m = new Module("F"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz").using("bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz").using("bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar")));
         // Bundle G
         moduleList.add(
             (m = new Module("G"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dot")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dot")));
 
         return target;
     }
@@ -198,24 +198,24 @@
         // Bundle A
         moduleList.add(
             target = (m = new Module("A"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("woz"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("woz"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz")));
         // Bundle D
         moduleList.add(
             (m = new Module("D"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz")));
 
         return target;
     }
@@ -229,80 +229,80 @@
         // Bundle A
         moduleList.add(
             (m = new Module("A"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "a").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "b").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "c").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "d").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "e").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "f").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "g").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "h").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "i").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "j").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "k").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "l").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "m").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "n").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "o").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "p").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "q").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "r").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "s").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "t").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "a").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "b").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "c").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "d").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "e").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "f").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "g").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "h").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "i").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "j").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "k").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "l").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "m").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "n").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "o").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "p").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "q").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "r").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "s").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "t").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle C
         moduleList.add(
             target = (m = new Module("C"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "a"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "b"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "c"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "d"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "e"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "f"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "g"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "h"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "i"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "j"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "k"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "l"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "m"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "n"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "o"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "p"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "q"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "r"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "s"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "t"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar")));
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "a"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "b"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "c"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "d"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "e"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "f"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "g"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "h"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "i"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "j"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "k"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "l"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "m"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "n"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "o"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "p"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "q"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "r"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "s"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "t"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar")));
         // Bundle D
         moduleList.add(
             (m = new Module("D"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "a"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "b"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "c"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "d"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "e"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "f"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "g"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "h"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "i"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "j"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "k"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "l"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "m"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "n"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "o"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "p"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "q"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "r"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "s"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "t")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "a"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "b"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "c"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "d"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "e"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "f"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "g"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "h"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "i"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "j"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "k"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "l"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "m"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "n"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "o"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "p"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "q"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "r"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "s"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "t")));
 
         return target;
     }
@@ -316,107 +316,107 @@
         // Bundle A
         moduleList.add(
             (m = new Module("A"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "a").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "b").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "c").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "d").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "e").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "f").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "g").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "h").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "i").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "j").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "k").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "l").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "m").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "n").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "o").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "p").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "q").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "r").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "s").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "t").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "a").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "b").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "c").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "d").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "e").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "f").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "g").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "h").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "i").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "j").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "k").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "l").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "m").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "n").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "o").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "p").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "q").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "r").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "s").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "t").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle C
         moduleList.add(
             target = (m = new Module("C"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "a"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "b"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "c"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "d"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "e"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "f"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "g"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "h"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "i"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "j"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "k"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "l"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "m"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "n"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "o"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "p"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "q"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "r"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "s"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "t"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar")));
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "a"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "b"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "c"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "d"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "e"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "f"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "g"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "h"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "i"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "j"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "k"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "l"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "m"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "n"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "o"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "p"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "q"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "r"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "s"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "t"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar")));
         // Bundle D
         moduleList.add(
             (m = new Module("D"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "a"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "b")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "a"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "b")));
         // Bundle E
         moduleList.add(
             (m = new Module("E"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "c"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "d")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "c"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "d")));
         // Bundle F
         moduleList.add(
             (m = new Module("F"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "e"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "f")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "e"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "f")));
         // Bundle G
         moduleList.add(
             (m = new Module("G"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "g"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "h")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "g"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "h")));
         // Bundle H
         moduleList.add(
             (m = new Module("H"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "i"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "j")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "i"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "j")));
         // Bundle I
         moduleList.add(
             (m = new Module("I"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "k"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "l")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "k"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "l")));
         // Bundle J
         moduleList.add(
             (m = new Module("J"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "m"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "n")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "m"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "n")));
         // Bundle K
         moduleList.add(
             (m = new Module("K"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "o"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "p")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "o"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "p")));
         // Bundle L
         moduleList.add(
             (m = new Module("L"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "q"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "r")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "q"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "r")));
         // Bundle M
         moduleList.add(
             (m = new Module("M"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "s"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "t")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "s"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "t")));
 
         return target;
     }
@@ -430,22 +430,22 @@
         // Bundle A
         moduleList.add(
             target = (m = new Module("A"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")
                     .with("attr=blah")));
 
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo").using("bar"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("baz"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo").using("bar"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("baz"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz")));
 
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz")
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz")
                     .with("attr=blah")));
 
         return target;
@@ -462,18 +462,18 @@
         // Bundle A
         moduleList.add(
             target = (m = new Module("A"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar")));
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo")));
 
         return target;
     }
@@ -487,19 +487,19 @@
         // Bundle A
         moduleList.add(
             target = (m = new Module("A"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar")));
 
         return target;
     }
@@ -513,26 +513,26 @@
         // Bundle A
         moduleList.add(
             (m = new Module("A"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foobar"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foobar"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo")));
         // Bundle B
         moduleList.add(
             target = (m = new Module("B"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foobar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foobar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz").using("bar")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz").using("bar")));
         // Bundle D
         moduleList.add(
             (m = new Module("D"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar")));
 
         return target;
     }
@@ -546,15 +546,15 @@
         // Bundle A
         moduleList.add(
             (m = new Module("A"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo").withMandatory("vendor=foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo").withMandatory("vendor=foo")));
         // Bundle B
         moduleList.add(
             target = (m = new Module("B"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo")));
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
 
         return target;
     }

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main2.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main2.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main2.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main2.java Wed Dec  2 21:07:04 2009
@@ -115,40 +115,40 @@
         // Bundle A
         moduleList.add(
             (m = new Module("A"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "baz")));
         targets.add(m);
         // Bundle B
         moduleList.add(
             (m = new Module("B"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("woz"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "bar").using("woz"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle D
         moduleList.add(
             (m = new Module("D"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "unused")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "woz"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "unused")));
         // Bundle E
         moduleList.add(
             (m = new Module("E"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz").using("dit"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "unused"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "dit")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "baz").using("dit"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "unused"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "dit")));
         // Bundle F
         moduleList.add(
             (m = new Module("F"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dit").using("foo"))
-                .exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "dit").using("foo"))
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "foo")));
         // Bundle G
         moduleList.add(
             (m = new Module("G"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
-                .importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "bar"))
+                .requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "woz")));
         targets.add(m);
 
         return targets;
@@ -164,8 +164,8 @@
 
         for (int i = 0; i < 1000; i++)
         {
-            m.exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "org.foo" + i));
-            m.importing(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "org.foo" + i));
+            m.providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "org.foo" + i));
+            m.requiring(new RequirementImpl(Capability.PACKAGE_NAMESPACE, "org.foo" + i));
         }
 
         return targets;
@@ -181,7 +181,7 @@
 
         for (int i = 0; i < 1000; i++)
         {
-            m.exporting(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "org.foo" + i));
+            m.providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE, "org.foo" + i));
         }
 
         return targets;

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Module.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Module.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Module.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Module.java Wed Dec  2 21:07:04 2009
@@ -20,22 +20,22 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import org.apache.felix.resolver.cs.Capability;
+import org.apache.felix.resolver.cs.Requirement;
 
 public class Module
 {
     private final String m_name;
-    private final List<CapabilityImpl> m_exports;
-    private final List<CapabilityImpl> m_substExports;
-    private final List<RequirementImpl> m_imports;
+    private final List<Capability> m_caps;
+    private final List<Requirement> m_reqs;
     private boolean m_isResolved = false;
     private List<Wire> m_wires = null;
 
     public Module(String name)
     {
         m_name = name;
-        m_exports = new ArrayList<CapabilityImpl>();
-        m_substExports = new ArrayList<CapabilityImpl>();
-        m_imports = new ArrayList<RequirementImpl>();
+        m_caps = new ArrayList<Capability>();
+        m_reqs = new ArrayList<Requirement>();
     }
 
     public String getName()
@@ -43,37 +43,26 @@
         return m_name;
     }
 
-    public Module exporting(CapabilityImpl ep)
+    public Module providing(Capability cap)
     {
-        m_exports.add(ep);
+        m_caps.add(cap);
         return this;
     }
 
-    public Module substExporting(CapabilityImpl ep)
+    public Module requiring(Requirement req)
     {
-        m_substExports.add(ep);
+        m_reqs.add(req);
         return this;
     }
 
-    public Module importing(RequirementImpl ip)
+    public List<Capability> getCapabilities()
     {
-        m_imports.add(ip);
-        return this;
-    }
-
-    public List<CapabilityImpl> getExports()
-    {
-        return m_exports;
-    }
-
-    public List<CapabilityImpl> getSubstitutableExports()
-    {
-        return m_substExports;
+        return m_caps;
     }
 
-    public List<RequirementImpl> getImports()
+    public List<Requirement> getRequirements()
     {
-        return m_imports;
+        return m_reqs;
     }
 
     public synchronized void resolve(List<Wire> wires)

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/RequirementImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/RequirementImpl.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/RequirementImpl.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/RequirementImpl.java Wed Dec  2 21:07:04 2009
@@ -97,7 +97,7 @@
         return this;
     }
 
-    public boolean isSatistfiedBy(CapabilityImpl ep)
+    public boolean isSatistfiedBy(Capability ep)
     {
         boolean result = m_name.equals(ep.getAttribute(Capability.PACKAGE_ATTR).getValue());
 

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Wire.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Wire.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Wire.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Wire.java Wed Dec  2 21:07:04 2009
@@ -18,19 +18,22 @@
  */
 package org.apache.felix.resolver;
 
+import org.apache.felix.resolver.cs.Capability;
+import org.apache.felix.resolver.cs.Requirement;
+
 public class Wire
 {
     private final Module m_importer;
-    private final RequirementImpl m_ip;
+    private final Requirement m_req;
     private final Module m_exporter;
-    private final CapabilityImpl m_ep;
+    private final Capability m_cap;
 
-    public Wire(Module importer, RequirementImpl ip, Module exporter, CapabilityImpl ep)
+    public Wire(Module importer, Requirement ip, Module exporter, Capability ep)
     {
         m_importer = importer;
-        m_ip = ip;
+        m_req = ip;
         m_exporter = exporter;
-        m_ep = ep;
+        m_cap = ep;
     }
 
     public Module getImporter()
@@ -38,9 +41,9 @@
         return m_importer;
     }
 
-    public RequirementImpl getImportedPackage()
+    public Requirement getRequirement()
     {
-        return m_ip;
+        return m_req;
     }
 
     public Module getExporter()
@@ -48,13 +51,13 @@
         return m_exporter;
     }
 
-    public CapabilityImpl getExportedPackage()
+    public Capability getCapability()
     {
-        return m_ep;
+        return m_cap;
     }
 
     public String toString()
     {
-        return "WIRE: " + m_ip + " (" + m_importer + ") -> " + m_ep + " (" + m_exporter + ")";
+        return "WIRE: " + m_req + " (" + m_importer + ") -> " + m_cap + " (" + m_exporter + ")";
     }
 }
\ No newline at end of file

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/CandidateSet.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/CandidateSet.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/CandidateSet.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/CandidateSet.java Wed Dec  2 21:07:04 2009
@@ -19,19 +19,19 @@
 package org.apache.felix.resolver.felix;
 
 import java.util.List;
-import org.apache.felix.resolver.RequirementImpl;
 import org.apache.felix.resolver.Module;
+import org.apache.felix.resolver.cs.Requirement;
 
 class CandidateSet
 {
     public static final int NORMAL = 0;
     public final Module m_module;
-    public final RequirementImpl m_requirement;
+    public final Requirement m_requirement;
     public final List m_candidates;
     public int m_idx = 0;
     public int m_rotated = 0;
 
-    public CandidateSet(Module module, RequirementImpl requirement, List candidates)
+    public CandidateSet(Module module, Requirement requirement, List candidates)
     {
         super();
         m_module = module;

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java Wed Dec  2 21:07:04 2009
@@ -24,23 +24,23 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import org.apache.felix.resolver.CapabilityImpl;
-import org.apache.felix.resolver.RequirementImpl;
 import org.apache.felix.resolver.Module;
+import org.apache.felix.resolver.RequirementImpl;
 import org.apache.felix.resolver.Resolver;
 import org.apache.felix.resolver.Version;
 import org.apache.felix.resolver.Wire;
 import org.apache.felix.resolver.cs.Attribute;
 import org.apache.felix.resolver.cs.Capability;
 import org.apache.felix.resolver.cs.CapabilitySet;
+import org.apache.felix.resolver.cs.Requirement;
 
 public class FelixResolver implements Resolver
 {
     private final List<Module> m_moduleList;
     private final FelixResolverImpl m_resolver = new FelixResolverImpl();
     private final ResolverStateImpl m_state = new ResolverStateImpl();
-    private final Map<String, List<CapabilityImpl>> m_unresolvedPkgIndex =
-        new HashMap<String, List<CapabilityImpl>>();
+    private final Map<String, List<Capability>> m_unresolvedPkgIndex =
+        new HashMap<String, List<Capability>>();
 
     public FelixResolver(List<Module> moduleList)
     {
@@ -58,7 +58,7 @@
         // Second, index module's capabilities.
         //
 
-        List<CapabilityImpl> eps = module.getExports();
+        List<Capability> eps = module.getCapabilities();
 
         // Add exports to unresolved package map.
         for (int i = 0; (eps != null) && (i < eps.size()); i++)
@@ -67,17 +67,17 @@
         }
     }
 
-    private void indexPackageCapability(CapabilityImpl ep)
+    private void indexPackageCapability(Capability ep)
     {
         String pkgName = (String) ep.getAttribute(Capability.PACKAGE_ATTR).getValue();
-        List<CapabilityImpl> epList = m_unresolvedPkgIndex.get(pkgName);
+        List<Capability> epList = m_unresolvedPkgIndex.get(pkgName);
 
         // We want to add the capability into the list of exporters
         // in sorted order (descending version and ascending bundle
         // identifier). Insert using a simple binary search algorithm.
         if (epList == null)
         {
-            epList = new ArrayList<CapabilityImpl>();
+            epList = new ArrayList<Capability>();
             epList.add(ep);
         }
         else
@@ -148,19 +148,19 @@
             return (Module[]) m_moduleList.toArray(new Module[m_moduleList.size()]);
         }
 
-        public List<CapabilityImpl> getResolvedCandidates(RequirementImpl req)
+        public List<Capability> getResolvedCandidates(Requirement req)
         {
-            return new ArrayList<CapabilityImpl>();
+            return new ArrayList<Capability>();
         }
 
-        public List<CapabilityImpl> getUnresolvedCandidates(RequirementImpl req)
+        public List<Capability> getUnresolvedCandidates(Requirement req)
         {
-            List<CapabilityImpl> matches = new ArrayList<CapabilityImpl>();
-            List<CapabilityImpl> candidates = m_unresolvedPkgIndex.get(req.getName());
+            List<Capability> matches = new ArrayList<Capability>();
+            List<Capability> candidates = m_unresolvedPkgIndex.get(((RequirementImpl) req).getName());
             for (int candIdx = 0; candIdx < candidates.size(); candIdx++)
             {
-                CapabilityImpl export = candidates.get(candIdx);
-                if (req.isSatistfiedBy(export))
+                Capability export = candidates.get(candIdx);
+                if (((RequirementImpl) req).isSatistfiedBy(export))
                 {
                     matches.add(export);
                 }

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolverImpl.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolverImpl.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolverImpl.java Wed Dec  2 21:07:04 2009
@@ -25,12 +25,11 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import org.apache.felix.resolver.CapabilityImpl;
-import org.apache.felix.resolver.RequirementImpl;
 import org.apache.felix.resolver.Module;
 import org.apache.felix.resolver.ResolveException;
 import org.apache.felix.resolver.Wire;
 import org.apache.felix.resolver.cs.Capability;
+import org.apache.felix.resolver.cs.Requirement;
 
 public class FelixResolverImpl
 {
@@ -113,14 +112,14 @@
 
         // Loop through each requirement and calculate its resolving
         // set of candidates.
-        List<RequirementImpl> reqs = targetModule.getImports();
+        List<Requirement> reqs = targetModule.getRequirements();
         for (int reqIdx = 0; (reqs != null) && (reqIdx < reqs.size()); reqIdx++)
         {
             // Get the candidates from the "resolved" and "unresolved"
             // package maps. The "resolved" candidates have higher priority
             // than "unresolved" ones, so put the "resolved" candidates
             // at the front of the list of candidates.
-            List<CapabilityImpl> candidates = state.getResolvedCandidates(reqs.get(reqIdx));
+            List<Capability> candidates = state.getResolvedCandidates(reqs.get(reqIdx));
             candidates.addAll(state.getUnresolvedCandidates(reqs.get(reqIdx)));
             // If we have candidates, then we need to recursively populate
             // the resolver map with each of them.
@@ -129,7 +128,7 @@
             {
                 for (Iterator it = candidates.iterator(); it.hasNext(); )
                 {
-                    CapabilityImpl candidate = (CapabilityImpl) it.next();
+                    Capability candidate = (Capability) it.next();
 
                     try
                     {
@@ -221,7 +220,7 @@
                     {
                         // If the invalid module is a candidate, then remove it from
                         // the candidate set.
-                        CapabilityImpl candCap = (CapabilityImpl) itCandidates.next();
+                        Capability candCap = (Capability) itCandidates.next();
                         if (candCap.getModule().equals(invalidModule))
                         {
                             itCandidates.remove();
@@ -394,7 +393,7 @@
             // Loop through each capability and test if it is consistent.
             for (int capIdx = 0; capIdx < rp.m_capList.size(); capIdx++)
             {
-                CapabilityImpl cap = (CapabilityImpl) rp.m_capList.get(capIdx);
+                Capability cap = (Capability) rp.m_capList.get(capIdx);
                 if (!isClassSpaceConsistent(cap.getModule(), moduleMap, cycleMap, candidatesMap))
                 {
                     return false;
@@ -477,7 +476,7 @@
                             && (rp.m_cs.m_rotated < rp.m_cs.m_candidates.size()))
                         {
                             // Rotate candidates.
-                            CapabilityImpl first = (CapabilityImpl) rp.m_cs.m_candidates.get(0);
+                            Capability first = (Capability) rp.m_cs.m_candidates.get(0);
                             for (int i = 1; i < rp.m_cs.m_candidates.size(); i++)
                             {
                                 rp.m_cs.m_candidates.set(i - 1, rp.m_cs.m_candidates.get(i));
@@ -526,7 +525,7 @@
             for (int capIdx = 0; capIdx < rp.m_capList.size(); capIdx++)
             {
                 usesMap = calculateUsesConstraints(
-                    (CapabilityImpl) rp.m_capList.get(capIdx),
+                    (Capability) rp.m_capList.get(capIdx),
                     moduleMap, usesMap, cycleMap, candidatesMap);
             }
         }
@@ -534,7 +533,7 @@
     }
 
     private static Map calculateUsesConstraints(
-        CapabilityImpl capTarget, Map moduleMap, Map usesMap,
+        Capability capTarget, Map moduleMap, Map usesMap,
         Map cycleMap, Map candidatesMap)
         throws ResolveException
     {
@@ -553,7 +552,7 @@
         Map pkgMap = getModulePackages(moduleMap, capTarget.getModule(), candidatesMap);
 
         // Cast to implementation class to get access to cached data.
-        CapabilityImpl cap = (CapabilityImpl) capTarget;
+        Capability cap = capTarget;
 
         // Loop through all "used" packages of the capability.
         for (int i = 0; i < cap.getUses().size(); i++)
@@ -574,7 +573,7 @@
                 for (int srcIdx = 0; srcIdx < rp.m_capList.size(); srcIdx++)
                 {
                     usesMap = calculateUsesConstraints(
-                        (CapabilityImpl) rp.m_capList.get(srcIdx),
+                        (Capability) rp.m_capList.get(srcIdx),
                         moduleMap, usesMap, cycleMap, candidatesMap);
                 }
 
@@ -665,7 +664,7 @@
             candSetIdx++)
         {
             CandidateSet cs = (CandidateSet) candSetList.get(candSetIdx);
-            CapabilityImpl candCap = (CapabilityImpl) cs.m_candidates.get(cs.m_idx);
+            Capability candCap = (Capability) cs.m_candidates.get(cs.m_idx);
 
             String pkgName = (String) candCap.getAttribute(Capability.PACKAGE_ATTR).getValue();
 
@@ -691,10 +690,10 @@
         {
             Wire wire = wires.get(wireIdx);
             String pkgName = (String)
-                wire.getExportedPackage().getAttribute(Capability.PACKAGE_ATTR).getValue();
+                wire.getCapability().getAttribute(Capability.PACKAGE_ATTR).getValue();
             ResolvedPackage rp = (ResolvedPackage) pkgMap.get(pkgName);
             rp = (rp == null) ? new ResolvedPackage(pkgName, null) : rp;
-            rp.m_capList.add(wire.getExportedPackage());
+            rp.m_capList.add(wire.getCapability());
             pkgMap.put(rp.m_name, rp);
         }
 
@@ -708,7 +707,7 @@
 
         // Loop through the target module's capabilities that represent
         // exported packages and add them to the exported package map.
-        List<CapabilityImpl> caps = targetModule.getExports();
+        List<Capability> caps = targetModule.getCapabilities();
         for (int capIdx = 0; (caps != null) && (capIdx < caps.size()); capIdx++)
         {
             String pkgName = (String)
@@ -778,20 +777,20 @@
             // Get the current candidate set.
             CandidateSet cs = (CandidateSet) candSetList.get(candSetIdx);
 
-            if (importer != ((CapabilityImpl) cs.m_candidates.get(cs.m_idx)).getModule())
+            if (importer != ((Capability) cs.m_candidates.get(cs.m_idx)).getModule())
             {
                 // Add wire for imported package.
                 packageWires.add(new Wire(
                     importer,
                     cs.m_requirement,
-                    ((CapabilityImpl) cs.m_candidates.get(cs.m_idx)).getModule(),
-                    ((CapabilityImpl) cs.m_candidates.get(cs.m_idx))));
+                    ((Capability) cs.m_candidates.get(cs.m_idx)).getModule(),
+                    ((Capability) cs.m_candidates.get(cs.m_idx))));
             }
 
             // Create any necessary wires for the selected candidate module.
             wireMap = populateWireMap(
                 state, candidatesMap,
-                ((CapabilityImpl) cs.m_candidates.get(cs.m_idx)).getModule(),
+                ((Capability) cs.m_candidates.get(cs.m_idx)).getModule(),
                 wireMap);
         }
 
@@ -812,7 +811,7 @@
     public static interface ResolverState
     {
         Module[] getModules();
-        List<CapabilityImpl> getResolvedCandidates(RequirementImpl req);
-        List<CapabilityImpl> getUnresolvedCandidates(RequirementImpl req);
+        List<Capability> getResolvedCandidates(Requirement req);
+        List<Capability> getUnresolvedCandidates(Requirement req);
     }
 }
\ No newline at end of file



Mime
View raw message