felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r886302 [2/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
Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/Main.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/Main.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/Main.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/Main.java Wed Dec  2 21:07:04 2009
@@ -84,126 +84,126 @@
 
         Module m;
         moduleList.add((m = new Module("system.bundle"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.activity"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.accessibility"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.annotation").with("version=1.1.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.annotation.security").with("version=1.1.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.annotation.sql").with("version=1.1.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.activation").with("version=1.1.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.crypto"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.crypto.spec"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.help"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.imageio"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.imageio.spi"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.imageio.stream"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.jws").with("version=2.0.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.jws.soap"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.loading"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.modelmbean"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.monitor"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.openmbean"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.relation"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.remote"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.remote.rmi"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.naming"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.naming.directory"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.naming.ldap"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.naming.spi"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.net"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.net.ssl"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.rmi"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.rmi.CORBA"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.callback"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.kerberos"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.login"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.spi"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.x500"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.cert"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.sasl"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.sql"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.sql.rowset"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.sql.rowset.serial"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.sql.rowset.spi"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.swing"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.swing.border"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.swing.event"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.swing.tree"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.tools"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind").with("version=2.2.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.annotation"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.annotation.adapters"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.attachment"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.helpers"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.util"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.datatype"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.namespace"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.parsers"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.registry"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.registry.infomodel"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.activity"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.accessibility"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.annotation").with("version=1.1.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.annotation.security").with("version=1.1.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.annotation.sql").with("version=1.1.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.activation").with("version=1.1.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.crypto"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.crypto.spec"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.help"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.imageio"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.imageio.spi"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.imageio.stream"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.jws").with("version=2.0.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.jws.soap"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.loading"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.modelmbean"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.monitor"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.openmbean"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.relation"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.remote"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.management.remote.rmi"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.naming"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.naming.directory"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.naming.ldap"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.naming.spi"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.net"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.net.ssl"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.rmi"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.rmi.CORBA"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.callback"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.kerberos"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.login"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.spi"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.auth.x500"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.cert"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.security.sasl"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.sql"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.sql.rowset"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.sql.rowset.serial"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.sql.rowset.spi"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.swing"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.swing.border"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.swing.event"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.swing.tree"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.tools"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind").with("version=2.2.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.annotation"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.annotation.adapters"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.attachment"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.helpers"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.bind.util"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.datatype"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.namespace"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.parsers"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.registry"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.registry.infomodel"))
 //            .exporting(new ExportedPackage(m, Capability.PACKAGE_NAMESPACE, "javax.xml.rpc").with("version=1.1.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.rpc.encoding").with("version=1.1.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.rpc.encoding").with("version=1.1.0"))
 //            .exporting(new ExportedPackage(m, Capability.PACKAGE_NAMESPACE, "javax.xml.rpc.handler.soap").with("version=1.1.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.rpc.holders").with("version=1.1.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.rpc.holders").with("version=1.1.0"))
 //            .exporting(new ExportedPackage(m, Capability.PACKAGE_NAMESPACE, "javax.xml.rpc.server").with("version=1.1.0"))
 //            .exporting(new ExportedPackage(m, Capability.PACKAGE_NAMESPACE, "javax.xml.rpc.soap").with("version=1.1.0"))
 //            .exporting(new ExportedPackage(m, Capability.PACKAGE_NAMESPACE, "javax.xml.soap").with("version=1.3.0"))
 //            .exporting(new ExportedPackage(m, Capability.PACKAGE_NAMESPACE, "javax.xml.stream").with("version=1.0.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.stream.events"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.stream.events"))
 //            .exporting(new ExportedPackage(m, Capability.PACKAGE_NAMESPACE, "javax.xml.stream.util").with("version=1.0.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.transform"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.transform.dom"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.transform.sax"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.transform.stream"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.validation"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws").with("version=2.2.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.handler").with("version=2.2.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.handler.soap").with("version=2.2.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.http"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.soap").with("version=2.2.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.spi").with("version=2.2.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.spi.http"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.wsaddressing"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.xpath"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.ietf.jgss"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA_2_3"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA_2_3.portable"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA.DynAnyPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA.ORBPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA.portable"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA.TypeCodePackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CosNaming"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CosNaming.NamingContextExtPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CosNaming.NamingContextPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.Dynamic"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.DynamicAny"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.DynamicAny.DynAnyFactoryPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.DynamicAny.DynAnyPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.IOP"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.IOP.CodecFactoryPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.IOP.CodecPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableInterceptor"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableInterceptor.ORBInitInfoPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.CurrentPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.POAManagerPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.POAPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.portable"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.ServantLocatorPackage"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.SendingContext"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.framework").with("version=1.4.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.service.packageadmin").with("version=1.2.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.service.startlevel").with("version=1.1.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.service.url").with("version=1.0.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.util.tracker").with("version=1.3.0"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.w3c.dom"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.w3c.dom.bootstrap"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.w3c.dom.ls"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.xml.sax"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.xml.sax.ext"))
-            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.xml.sax.helpers"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.transform"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.transform.dom"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.transform.sax"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.transform.stream"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.validation"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws").with("version=2.2.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.handler").with("version=2.2.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.handler.soap").with("version=2.2.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.http"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.soap").with("version=2.2.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.spi").with("version=2.2.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.spi.http"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.ws.wsaddressing"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "javax.xml.xpath"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.ietf.jgss"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA_2_3"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA_2_3.portable"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA.DynAnyPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA.ORBPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA.portable"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CORBA.TypeCodePackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CosNaming"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CosNaming.NamingContextExtPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.CosNaming.NamingContextPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.Dynamic"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.DynamicAny"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.DynamicAny.DynAnyFactoryPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.DynamicAny.DynAnyPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.IOP"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.IOP.CodecFactoryPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.IOP.CodecPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableInterceptor"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableInterceptor.ORBInitInfoPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.CurrentPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.POAManagerPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.POAPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.portable"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.PortableServer.ServantLocatorPackage"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.omg.SendingContext"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.framework").with("version=1.4.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.service.packageadmin").with("version=1.2.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.service.startlevel").with("version=1.1.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.service.url").with("version=1.0.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.osgi.util.tracker").with("version=1.3.0"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.w3c.dom"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.w3c.dom.bootstrap"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.w3c.dom.ls"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.xml.sax"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.xml.sax.ext"))
+            .providing(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.xml.sax.helpers"))
 // Optional
 /*
             .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.corba.ee.impl.orbutil.closure"))
@@ -343,7 +343,7 @@
                 target != null;
                 target = getTargetUnresolvedModule(moduleList))
             {
-                System.out.println("Target: " + target + " (" + target.getImports().size() + ")");
+                System.out.println("Target: " + target + " (" + target.getRequirements().size() + ")");
                 long starttime = System.currentTimeMillis();
                 Map<Module, List<Wire>> wireMap = resolver.resolve(target);
                 long endtime = System.currentTimeMillis();
@@ -388,7 +388,7 @@
             Module m = modules.get(modIdx);
             if (!m.isResolved()
                 && ((maxImporter == null)
-                    || (maxImporter.getImports().size() < m.getImports().size())))
+                    || (maxImporter.getRequirements().size() < m.getRequirements().size())))
             {
                 maxImporter = m;
             }
@@ -663,7 +663,7 @@
             {
                 throw new RuntimeException("Unsupported capability: " + caps.get(capIdx).getNamespace());
             }
-            module.exporting(convertToCapability(module, caps.get(capIdx)));
+            module.providing(convertToCapability(module, caps.get(capIdx)));
         }
     }
 
@@ -681,7 +681,7 @@
                 System.out.println("Unsupported requirement: " + reqs.get(reqIdx).getNamespace());
                 System.exit(0);
             }
-            module.importing(convertToRequirement(module, reqs.get(reqIdx)));
+            module.requiring(convertToRequirement(module, reqs.get(reqIdx)));
         }
     }
 }
\ No newline at end of file

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/prototype/ProtoResolver.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/prototype/ProtoResolver.java?rev=886302&r1=886301&r2=886302&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/prototype/ProtoResolver.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/prototype/ProtoResolver.java Wed Dec  2 21:07:04 2009
@@ -31,6 +31,7 @@
 import java.util.TreeSet;
 import org.apache.felix.resolver.cs.Capability;
 import org.apache.felix.resolver.cs.CapabilitySet;
+import org.apache.felix.resolver.cs.Requirement;
 
 public class ProtoResolver implements Resolver
 {
@@ -40,8 +41,8 @@
         new HashMap<Module, Map<String, Blame>>();
     private final Map<Module, Map<String, Blame>> m_resolvingConstraintCache =
         new HashMap<Module, Map<String, Blame>>();
-    private final Map<CapabilityImpl, Map<String, Blame>> m_resolvedConstraintCache =
-        new HashMap<CapabilityImpl, Map<String, Blame>>();
+    private final Map<Capability, Map<String, Blame>> m_resolvedConstraintCache =
+        new HashMap<Capability, Map<String, Blame>>();
     private Map<Module, Map<String, Object>> m_verifyCache =
         new HashMap<Module, Map<String, Object>>();
 
@@ -58,7 +59,7 @@
         m_pkgCapSet = new CapabilitySet(indices);
         for (int modIdx = 0; modIdx < m_moduleList.size(); modIdx++)
         {
-            List<CapabilityImpl> exports = m_moduleList.get(modIdx).getExports();
+            List<Capability> exports = m_moduleList.get(modIdx).getCapabilities();
             for (int expIdx = 0; expIdx < exports.size(); expIdx++)
             {
                 m_pkgCapSet.addCapability(exports.get(expIdx));
@@ -82,8 +83,8 @@
     }
 
     private Module m_rootModule = null;
-    private List<Map<RequirementImpl, Set<Capability>>> m_candidatePermutations
-        = new ArrayList<Map<RequirementImpl, Set<Capability>>>();
+    private List<Map<Requirement, Set<Capability>>> m_candidatePermutations
+        = new ArrayList<Map<Requirement, Set<Capability>>>();
 
     public Map<Module, List<Wire>> resolve(Module module)
     {
@@ -92,11 +93,11 @@
         m_resolvingConstraintCache.clear();
         m_resolvedConstraintCache.clear();
         m_verifyCache.clear();
-        Map<RequirementImpl, Set<Capability>> candidateMap = resolve(
+        Map<Requirement, Set<Capability>> candidateMap = resolve(
             module,
             null,
             module,
-            new HashMap<RequirementImpl, Set<Capability>>(),
+            new HashMap<Requirement, Set<Capability>>(),
             new HashMap<String, Blame>(),
             new HashMap<Module, Boolean>());
 
@@ -107,9 +108,9 @@
         return populateWireMap(module, candidateMap, new HashMap<Module, List<Wire>>());
     }
 
-    private Map<RequirementImpl, Set<Capability>> resolve(
-        Module module, CapabilityImpl epGoal, Module blameModule,
-        Map<RequirementImpl, Set<Capability>> candidateMap,
+    private Map<Requirement, Set<Capability>> resolve(
+        Module module, Capability capGoal, Module blameModule,
+        Map<Requirement, Set<Capability>> candidateMap,
         Map<String, Blame> existingConstrains,
         Map<Module, Boolean> cycleMap)
     {
@@ -148,7 +149,7 @@
 
                             Map<String, Blame> currentConstraints =
                                 calculateResolvingConstraints(module, blameModule);
-                            checkConsistency(module, epGoal, candidateMap,
+                            checkConsistency(module, capGoal, candidateMap,
                                 existingConstraintsCopy, currentConstraints);
                             existingConstrains.putAll(existingConstraintsCopy);
                         }
@@ -167,23 +168,23 @@
                     }
 
                     // Find candidates for all imports for the target module.
-                    List<RequirementImpl> imports = module.getImports();
-                    for (RequirementImpl ip : imports)
+                    List<Requirement> reqs = module.getRequirements();
+                    for (Requirement req : reqs)
                     {
                         // If we are using a permutated candidate map, then the target
                         // module's candidates may have already been calculated, so use
                         // those instead, otherwise find the matching providers.
-                        if (candidateMap.get(ip) == null)
+                        if (candidateMap.get(req) == null)
                         {
-                            Set<Capability> exporters = findExporters(ip);
-                            if ((exporters.size() == 0) && !ip.isOptional())
+                            Set<Capability> exporters = findExporters(req);
+                            if ((exporters.size() == 0) && !req.isOptional())
                             {
                                 throw new RuntimeException("Unable to resolve " + module
-                                    + ": missing requirement " + ip);
+                                    + ": missing requirement " + req);
                             }
                             else if (exporters.size() > 0)
                             {
-                                candidateMap.put(ip, exporters);
+                                candidateMap.put(req, exporters);
                             }
                         }
                     }
@@ -205,10 +206,10 @@
                         repeat = false;
 
                         // Loop through all of the target module's imports and v
-                        for (RequirementImpl ip : imports)
+                        for (Requirement req : reqs)
                         {
                             // Get the current candidate capability for the current import.
-                            Set<Capability> exporters = candidateMap.get(ip);
+                            Set<Capability> exporters = candidateMap.get(req);
                             // Optional imports may not have any exporters.
                             if (exporters == null)
                             {
@@ -225,7 +226,7 @@
                                 {
                                     mergeResolvedConstraints(
                                         module, candidateMap, currentConstraintsCopy,
-                                        (CapabilityImpl) cap);
+                                        cap);
                                 }
                                 // If current candidate is the same as the module being
                                 // resolved, then just directly add it as a constraint.
@@ -233,7 +234,7 @@
                                 {
                                     currentConstraintsCopy.put(
                                         (String) cap.getAttribute(Capability.PACKAGE_ATTR).getValue(),
-                                        new Blame((CapabilityImpl) cap, blameModule));
+                                        new Blame(cap, blameModule));
                                 }
                                 // If the current candidate is not resolved, then try to resolve
                                 // it, which will also merge packages while verify constraints.
@@ -241,7 +242,7 @@
                                 {
                                     resolve(
                                         cap.getModule(),
-                                        (CapabilityImpl) cap,
+                                        cap,
                                         module,
                                         candidateMap,
                                         currentConstraintsCopy,
@@ -259,7 +260,7 @@
                                 // Remove offending candidate.
                                 itExporters.remove();
 //System.out.println("Updated candidate map   : " + candidateMap);
-                                if (!itExporters.hasNext() && !ip.isOptional())
+                                if (!itExporters.hasNext() && !req.isOptional())
                                 {
                                     // TODO: PROTO RESOLVER - Maybe this should be moved.
                                     if ((module == m_rootModule) && (m_candidatePermutations.size() > 0))
@@ -275,9 +276,9 @@
                                     }
                                     else
                                     {
-                                        candidateMap.remove(ip);
+                                        candidateMap.remove(req);
                                         throw new ResolveException("Unresolved constraint "
-                                            + ip + " in " + module);
+                                            + req + " in " + module);
                                     }
                                 }
                                 else
@@ -297,7 +298,7 @@
 //System.out.println("+++ existingConstraints: " + existingConstraintsCopy);
 //System.out.println("+++ currentConstraints : " + currentConstraints);
                     checkConsistency(
-                        module, epGoal, candidateMap, existingConstraintsCopy, currentConstraintsCopy);
+                        module, capGoal, candidateMap, existingConstraintsCopy, currentConstraintsCopy);
                     // If we are here, then the candidates were consistent with
                     // existing constraints, so cache the result.
                     m_resolvingConstraintCache.put(module, existingConstraintsCopy);
@@ -352,7 +353,7 @@
         return constraintsCopy;
     }
 
-    private Set<Capability> findExporters(RequirementImpl ip)
+    private Set<Capability> findExporters(Requirement req)
     {
         if (m_isInvokeCount)
         {
@@ -365,30 +366,30 @@
         Set<Capability> result = new TreeSet(new Comparator() {
             public int compare(Object arg1, Object arg2)
             {
-                CapabilityImpl ep1 = (CapabilityImpl) arg1;
-                CapabilityImpl ep2 = (CapabilityImpl) arg2;
-                int c = ep1.getAttribute(Capability.PACKAGE_ATTR).getValue().compareTo(
-                    ep2.getAttribute(Capability.PACKAGE_ATTR).getValue());
+                Capability cap1 = (Capability) arg1;
+                Capability cap2 = (Capability) arg2;
+                int c = cap1.getAttribute(Capability.PACKAGE_ATTR).getValue().compareTo(
+                    cap2.getAttribute(Capability.PACKAGE_ATTR).getValue());
                 if (c == 0)
                 {
-                    Version v1 = (ep1.getAttribute(Capability.VERSION_ATTR) == null)
+                    Version v1 = (cap1.getAttribute(Capability.VERSION_ATTR) == null)
                         ? Version.emptyVersion
-                        : (Version) ep1.getAttribute(Capability.VERSION_ATTR).getValue();
-                    Version v2 = (ep1.getAttribute(Capability.VERSION_ATTR) == null)
+                        : (Version) cap1.getAttribute(Capability.VERSION_ATTR).getValue();
+                    Version v2 = (cap1.getAttribute(Capability.VERSION_ATTR) == null)
                         ? Version.emptyVersion
-                        : (Version) ep1.getAttribute(Capability.VERSION_ATTR).getValue();
+                        : (Version) cap1.getAttribute(Capability.VERSION_ATTR).getValue();
                     // Compare these in reverse order, since we want
                     // highest version to have priority.
                     c = v2.compareTo(v1);
                     if (c == 0)
                     {
-                        c = ep1.getModule().getName().compareTo(ep2.getModule().getName());
+                        c = cap1.getModule().getName().compareTo(cap2.getModule().getName());
                     }
                 }
                 return c;
             }
         });
-        result.addAll(m_pkgCapSet.match(ip.getFilter()));
+        result.addAll(m_pkgCapSet.match(req.getFilter()));
         return result;
     }
 
@@ -410,7 +411,7 @@
         {
             constraints = new HashMap<String, Blame>();
 
-            List<CapabilityImpl> exports = module.getExports();
+            List<Capability> exports = module.getCapabilities();
             for (int i = 0; i < exports.size(); i++)
             {
                 // TODO: PROTO RESOLVER - Assume if a module imports the same package it
@@ -444,7 +445,7 @@
         return constraints;
     }
 
-    private boolean hasOverlappingImport(Module module, CapabilityImpl ep)
+    private boolean hasOverlappingImport(Module module, Capability cap)
     {
         if (m_isInvokeCount)
         {
@@ -454,10 +455,10 @@
             m_invokeCounts.put(methodName, count);
         }
 
-        List<RequirementImpl> imports = module.getImports();
+        List<Requirement> imports = module.getRequirements();
         for (int i = 0; i < imports.size(); i++)
         {
-            if (m_pkgCapSet.matches(ep, imports.get(i).getFilter()))
+            if (m_pkgCapSet.matches(cap, imports.get(i).getFilter()))
             {
                 return true;
             }
@@ -466,8 +467,8 @@
     }
 
     private void mergeResolvedConstraints(
-        Module blameModule, Map<RequirementImpl, Set<Capability>> candidateMap,
-        Map<String, Blame> currentConstraints, CapabilityImpl epTarget)
+        Module blameModule, Map<Requirement, Set<Capability>> candidateMap,
+        Map<String, Blame> currentConstraints, Capability capTarget)
     {
         if (m_isInvokeCount)
         {
@@ -477,11 +478,11 @@
             m_invokeCounts.put(methodName, count);
         }
 
-        Map<String, Blame> actualConstraints = calculateResolvedConstraints(blameModule, epTarget);
-        verifyUses(blameModule, (String) epTarget.getAttribute(Capability.PACKAGE_ATTR).getValue(),
+        Map<String, Blame> actualConstraints = calculateResolvedConstraints(blameModule, capTarget);
+        verifyUses(blameModule, (String) capTarget.getAttribute(Capability.PACKAGE_ATTR).getValue(),
             candidateMap, currentConstraints, actualConstraints,
             new HashMap<String, List<Module>>());
-//System.out.println("+++ ACTUAL FOR " + epTarget + " = " + actualConstraints);
+//System.out.println("+++ ACTUAL FOR " + capTarget + " = " + actualConstraints);
         // Merge current constraints with existing constraints.
         for (Iterator<Entry<String, Blame>> it = actualConstraints.entrySet().iterator();
             it.hasNext(); )
@@ -505,7 +506,7 @@
     }
 
     private Map<String, Blame> calculateResolvedConstraints(
-        Module blameModule, CapabilityImpl epTarget)
+        Module blameModule, Capability capTarget)
     {
         if (m_isInvokeCount)
         {
@@ -515,8 +516,8 @@
             m_invokeCounts.put(methodName, count);
         }
 
-//System.out.println("+++ CALC FOR " + epTarget);
-        Map<String, Blame> constraints = m_resolvedConstraintCache.get(epTarget);
+//System.out.println("+++ CALC FOR " + capTarget);
+        Map<String, Blame> constraints = m_resolvedConstraintCache.get(capTarget);
 
         // If the constraints aren't cached, then calculate them.
         if (constraints == null)
@@ -524,17 +525,17 @@
             constraints = new HashMap<String, Blame>();
 
             // The capability itself is a constraint, so add it.
-            constraints.put((String) epTarget.getAttribute(Capability.PACKAGE_ATTR).getValue(),
-                new Blame(epTarget, blameModule));
+            constraints.put((String) capTarget.getAttribute(Capability.PACKAGE_ATTR).getValue(),
+                new Blame(capTarget, blameModule));
 
             // Calculate implied constraints.
             calculateResolvedUsesConstraints(
-                epTarget,
+                capTarget,
                 constraints,
-                new HashMap<CapabilityImpl, CapabilityImpl>());
+                new HashMap<Capability, Capability>());
 
             // Cache answer.
-            m_resolvedConstraintCache.put(epTarget, constraints);
+            m_resolvedConstraintCache.put(capTarget, constraints);
         }
         // If they are cached, then we need to make a copy to set the
         // blame module correctly.
@@ -545,7 +546,7 @@
                 it.hasNext(); )
             {
                 Entry<String, Blame> entry = it.next();
-                if (entry.getValue().m_exportedPackage.getModule() == epTarget.getModule())
+                if (entry.getValue().m_exportedPackage.getModule() == capTarget.getModule())
                 {
                     constraintsCopy.put(
                         entry.getKey(), new Blame(entry.getValue().m_exportedPackage, blameModule));
@@ -562,8 +563,8 @@
     }
 
     private void calculateResolvedUsesConstraints(
-        CapabilityImpl epTarget, Map<String, Blame> constraints,
-        Map<CapabilityImpl, CapabilityImpl> cycleMap)
+        Capability capTarget, Map<String, Blame> constraints,
+        Map<Capability, Capability> cycleMap)
     {
         if (m_isInvokeCount)
         {
@@ -573,55 +574,55 @@
             m_invokeCounts.put(methodName, count);
         }
 
-        if (cycleMap.containsKey(epTarget))
+        if (cycleMap.containsKey(capTarget))
         {
             return;
         }
-        cycleMap.put(epTarget, epTarget);
+        cycleMap.put(capTarget, capTarget);
 
-        List<String> uses = epTarget.getUses();
+        List<String> uses = capTarget.getUses();
         for (int usesIdx = 0; usesIdx < uses.size(); usesIdx++)
         {
             // We need to find the source of the package name for the current target.
             // It can either be from an importer or an exporter.
-            CapabilityImpl epSource = null;
+            Capability capSource = null;
 
             // Search the target module's wires for the package.
             for (int wireIdx = 0;
-                (epSource == null) && (wireIdx < epTarget.getModule().getWires().size());
+                (capSource == null) && (wireIdx < capTarget.getModule().getWires().size());
                 wireIdx++)
             {
-                if (epTarget.getModule().getWires().get(wireIdx)
-                    .getExportedPackage().getAttribute(Capability.PACKAGE_ATTR).getValue()
+                if (capTarget.getModule().getWires().get(wireIdx)
+                    .getCapability().getAttribute(Capability.PACKAGE_ATTR).getValue()
                         .equals(uses.get(usesIdx)))
                 {
-                    epSource = epTarget.getModule().getWires().get(wireIdx).getExportedPackage();
+                    capSource = capTarget.getModule().getWires().get(wireIdx).getCapability();
                 }
             }
 
             // If we couldn't find a wire for the package, then search the target
             // modules exports.
             for (int expIdx = 0;
-                (epSource == null) && (expIdx < epTarget.getModule().getExports().size());
+                (capSource == null) && (expIdx < capTarget.getModule().getCapabilities().size());
                 expIdx++)
             {
-                if (epTarget.getModule().getExports().get(expIdx)
+                if (capTarget.getModule().getCapabilities().get(expIdx)
                     .getAttribute(Capability.PACKAGE_ATTR).getValue().equals(uses.get(usesIdx)))
                 {
-                    epSource = epTarget.getModule().getExports().get(expIdx);
+                    capSource = capTarget.getModule().getCapabilities().get(expIdx);
                 }
             }
 
-            if (epSource != null)
+            if (capSource != null)
             {
-                constraints.put(uses.get(usesIdx), new Blame(epSource, epTarget.getModule()));
-                calculateResolvedUsesConstraints(epSource, constraints, cycleMap);
+                constraints.put(uses.get(usesIdx), new Blame(capSource, capTarget.getModule()));
+                calculateResolvedUsesConstraints(capSource, constraints, cycleMap);
             }
         }
     }
 
     private void checkConsistency(
-        Module targetModule, CapabilityImpl epGoal, Map<RequirementImpl,
+        Module targetModule, Capability capGoal, Map<Requirement,
         Set<Capability>> candidateMap, Map<String, Blame> existingConstraints,
         Map<String, Blame> currentConstraints)
         
@@ -635,16 +636,16 @@
             m_invokeCounts.put(methodName, count);
         }
 
-//System.out.println("Goal: " + ipGoal);
+//System.out.println("Goal: " + capGoal);
 //System.out.println("Candidate map: " + candidateMap);
 //System.out.println(targetModule + " current  : " + currentConstraints);
 //System.out.println(spaces(targetModule.toString()) + " existing : " + existingConstraints);
         // Find matching providing for requirement.
-        if (epGoal != null)
+        if (capGoal != null)
         {
             verifyUses(
                 targetModule,
-                (String) epGoal.getAttribute(Capability.PACKAGE_ATTR).getValue(),
+                (String) capGoal.getAttribute(Capability.PACKAGE_ATTR).getValue(),
                 candidateMap, existingConstraints, currentConstraints,
                 new HashMap<String, List<Module>>());
         }
@@ -664,7 +665,7 @@
     }
 
     private void verifyUses(Module targetModule, String pkgName,
-        Map<RequirementImpl, Set<Capability>> candidateMap,
+        Map<Requirement, Set<Capability>> candidateMap,
         Map<String, Blame> existingConstraints,
         Map<String, Blame> currentConstraints, Map<String, List<Module>> cycleMap)
     {
@@ -714,7 +715,7 @@
         {
 //System.out.println("Conflict: " + existing.m_exportedPackage + " WITH " + current.m_exportedPackage);
 //System.out.println("Blame: " + existing.m_blameModules + " AND " + current.m_blameModules);
-            Map<RequirementImpl, Set<Capability>> candidateMapCopy = copyCandidateMap(candidateMap);
+            Map<Requirement, Set<Capability>> candidateMapCopy = copyCandidateMap(candidateMap);
             boolean modified = false;
             boolean invalid = false;
             for (int blameIdx = 0; blameIdx < existing.m_blameModules.size(); blameIdx++)
@@ -724,8 +725,8 @@
                 // to them.
                 if (!existing.m_blameModules.get(blameIdx).isResolved())
                 {
-                    List<RequirementImpl> blameImports =
-                        existing.m_blameModules.get(blameIdx).getImports();
+                    List<Requirement> blameImports =
+                        existing.m_blameModules.get(blameIdx).getRequirements();
                     for (int impIdx = 0; impIdx < blameImports.size(); impIdx++)
                     {
                         // TODO: PROTO RESOLVER - Not efficient at all.
@@ -811,8 +812,8 @@
         answers.put(pkgName, Boolean.TRUE);
     }
 
-    private static Map<RequirementImpl, Set<Capability>> copyCandidateMap(
-        Map<RequirementImpl, Set<Capability>> candidateMap)
+    private static Map<Requirement, Set<Capability>> copyCandidateMap(
+        Map<Requirement, Set<Capability>> candidateMap)
     {
         if (m_isInvokeCount)
         {
@@ -822,18 +823,18 @@
             m_invokeCounts.put(methodName, count);
         }
 
-        Map<RequirementImpl, Set<Capability>> copy = new HashMap<RequirementImpl, Set<Capability>>();
-        for (Iterator<Entry<RequirementImpl, Set<Capability>>> it = candidateMap.entrySet().iterator();
+        Map<Requirement, Set<Capability>> copy = new HashMap<Requirement, Set<Capability>>();
+        for (Iterator<Entry<Requirement, Set<Capability>>> it = candidateMap.entrySet().iterator();
             it.hasNext(); )
         {
-            Entry<RequirementImpl, Set<Capability>> entry = it.next();
+            Entry<Requirement, Set<Capability>> entry = it.next();
             copy.put(entry.getKey(), new HashSet(entry.getValue()));
         }
         return copy;
     }
 
     private static Map<Module, List<Wire>> populateWireMap(
-        Module module, Map<RequirementImpl, Set<Capability>> candidateMap,
+        Module module, Map<Requirement, Set<Capability>> candidateMap,
         Map<Module, List<Wire>> wireMap)
     {
         if (m_isInvokeCount)
@@ -849,7 +850,7 @@
             List<Wire> moduleWires = new ArrayList<Wire>();
             wireMap.put(module, moduleWires);
 
-            List<RequirementImpl> imports = module.getImports();
+            List<Requirement> imports = module.getRequirements();
             for (int i = 0; i < imports.size(); i++)
             {
                 Set<Capability> candidates = candidateMap.get(imports.get(i));
@@ -868,7 +869,7 @@
                             new Wire(module,
                                 imports.get(i),
                                 cap.getModule(),
-                                (CapabilityImpl) cap));
+                                cap));
                     }
                 }
             }
@@ -878,9 +879,9 @@
 
     public static class Blame
     {
-        public final CapabilityImpl m_exportedPackage;
+        public final Capability m_exportedPackage;
         public final List<Module> m_blameModules;
-        public Blame(CapabilityImpl exportedPackage, Module blameModule)
+        public Blame(Capability exportedPackage, Module blameModule)
         {
             m_exportedPackage = exportedPackage;
             m_blameModules = new ArrayList<Module>();



Mime
View raw message