felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r886175 [2/3] - in /felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver: ./ cs/ felix/ manifestparser/ prototype/
Date Wed, 02 Dec 2009 15:34:57 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=886175&r1=886174&r2=886175&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 15:34:56 2009
@@ -30,11 +30,12 @@
 import java.util.Map.Entry;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
-import org.apache.felix.resolver.ExportedPackage;
-import org.apache.felix.resolver.ImportedPackage;
+import org.apache.felix.resolver.CapabilityImpl;
+import org.apache.felix.resolver.RequirementImpl;
 import org.apache.felix.resolver.Module;
 import org.apache.felix.resolver.Resolver;
 import org.apache.felix.resolver.Wire;
+import org.apache.felix.resolver.cs.Capability;
 import org.apache.felix.resolver.felix.FelixResolver;
 import org.apache.felix.resolver.prototype.ProtoResolver;
 
@@ -83,219 +84,219 @@
 
         Module m;
         moduleList.add((m = new Module("system.bundle"))
-            .exporting(new ExportedPackage(m, "javax.activity"))
-            .exporting(new ExportedPackage(m, "javax.accessibility"))
-            .exporting(new ExportedPackage(m, "javax.annotation").with("version=1.1.0"))
-            .exporting(new ExportedPackage(m, "javax.annotation.security").with("version=1.1.0"))
-            .exporting(new ExportedPackage(m, "javax.annotation.sql").with("version=1.1.0"))
-            .exporting(new ExportedPackage(m, "javax.activation").with("version=1.1.0"))
-            .exporting(new ExportedPackage(m, "javax.crypto"))
-            .exporting(new ExportedPackage(m, "javax.crypto.spec"))
-            .exporting(new ExportedPackage(m, "javax.help"))
-            .exporting(new ExportedPackage(m, "javax.imageio"))
-            .exporting(new ExportedPackage(m, "javax.imageio.spi"))
-            .exporting(new ExportedPackage(m, "javax.imageio.stream"))
-            .exporting(new ExportedPackage(m, "javax.jws").with("version=2.0.0"))
-            .exporting(new ExportedPackage(m, "javax.jws.soap"))
-            .exporting(new ExportedPackage(m, "javax.management"))
-            .exporting(new ExportedPackage(m, "javax.management.loading"))
-            .exporting(new ExportedPackage(m, "javax.management.modelmbean"))
-            .exporting(new ExportedPackage(m, "javax.management.monitor"))
-            .exporting(new ExportedPackage(m, "javax.management.openmbean"))
-            .exporting(new ExportedPackage(m, "javax.management.relation"))
-            .exporting(new ExportedPackage(m, "javax.management.remote"))
-            .exporting(new ExportedPackage(m, "javax.management.remote.rmi"))
-            .exporting(new ExportedPackage(m, "javax.naming"))
-            .exporting(new ExportedPackage(m, "javax.naming.directory"))
-            .exporting(new ExportedPackage(m, "javax.naming.ldap"))
-            .exporting(new ExportedPackage(m, "javax.naming.spi"))
-            .exporting(new ExportedPackage(m, "javax.net"))
-            .exporting(new ExportedPackage(m, "javax.net.ssl"))
-            .exporting(new ExportedPackage(m, "javax.rmi"))
-            .exporting(new ExportedPackage(m, "javax.rmi.CORBA"))
-            .exporting(new ExportedPackage(m, "javax.security.auth"))
-            .exporting(new ExportedPackage(m, "javax.security.auth.callback"))
-            .exporting(new ExportedPackage(m, "javax.security.auth.kerberos"))
-            .exporting(new ExportedPackage(m, "javax.security.auth.login"))
-            .exporting(new ExportedPackage(m, "javax.security.auth.spi"))
-            .exporting(new ExportedPackage(m, "javax.security.auth.x500"))
-            .exporting(new ExportedPackage(m, "javax.security.cert"))
-            .exporting(new ExportedPackage(m, "javax.security.sasl"))
-            .exporting(new ExportedPackage(m, "javax.sql"))
-            .exporting(new ExportedPackage(m, "javax.sql.rowset"))
-            .exporting(new ExportedPackage(m, "javax.sql.rowset.serial"))
-            .exporting(new ExportedPackage(m, "javax.sql.rowset.spi"))
-            .exporting(new ExportedPackage(m, "javax.swing"))
-            .exporting(new ExportedPackage(m, "javax.swing.border"))
-            .exporting(new ExportedPackage(m, "javax.swing.event"))
-            .exporting(new ExportedPackage(m, "javax.swing.tree"))
-            .exporting(new ExportedPackage(m, "javax.tools"))
-            .exporting(new ExportedPackage(m, "javax.xml"))
-            .exporting(new ExportedPackage(m, "javax.xml.bind").with("version=2.2.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.bind.annotation"))
-            .exporting(new ExportedPackage(m, "javax.xml.bind.annotation.adapters"))
-            .exporting(new ExportedPackage(m, "javax.xml.bind.attachment"))
-            .exporting(new ExportedPackage(m, "javax.xml.bind.helpers"))
-            .exporting(new ExportedPackage(m, "javax.xml.bind.util"))
-            .exporting(new ExportedPackage(m, "javax.xml.datatype"))
-            .exporting(new ExportedPackage(m, "javax.xml.namespace"))
-            .exporting(new ExportedPackage(m, "javax.xml.parsers"))
-            .exporting(new ExportedPackage(m, "javax.xml.registry"))
-            .exporting(new ExportedPackage(m, "javax.xml.registry.infomodel"))
-//            .exporting(new ExportedPackage(m, "javax.xml.rpc").with("version=1.1.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.rpc.encoding").with("version=1.1.0"))
-//            .exporting(new ExportedPackage(m, "javax.xml.rpc.handler.soap").with("version=1.1.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.rpc.holders").with("version=1.1.0"))
-//            .exporting(new ExportedPackage(m, "javax.xml.rpc.server").with("version=1.1.0"))
-//            .exporting(new ExportedPackage(m, "javax.xml.rpc.soap").with("version=1.1.0"))
-//            .exporting(new ExportedPackage(m, "javax.xml.soap").with("version=1.3.0"))
-//            .exporting(new ExportedPackage(m, "javax.xml.stream").with("version=1.0.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.stream.events"))
-//            .exporting(new ExportedPackage(m, "javax.xml.stream.util").with("version=1.0.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.transform"))
-            .exporting(new ExportedPackage(m, "javax.xml.transform.dom"))
-            .exporting(new ExportedPackage(m, "javax.xml.transform.sax"))
-            .exporting(new ExportedPackage(m, "javax.xml.transform.stream"))
-            .exporting(new ExportedPackage(m, "javax.xml.validation"))
-            .exporting(new ExportedPackage(m, "javax.xml.ws").with("version=2.2.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.ws.handler").with("version=2.2.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.ws.handler.soap").with("version=2.2.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.ws.http"))
-            .exporting(new ExportedPackage(m, "javax.xml.ws.soap").with("version=2.2.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.ws.spi").with("version=2.2.0"))
-            .exporting(new ExportedPackage(m, "javax.xml.ws.spi.http"))
-            .exporting(new ExportedPackage(m, "javax.xml.ws.wsaddressing"))
-            .exporting(new ExportedPackage(m, "javax.xml.xpath"))
-            .exporting(new ExportedPackage(m, "org.ietf.jgss"))
-            .exporting(new ExportedPackage(m, "org.omg.CORBA_2_3"))
-            .exporting(new ExportedPackage(m, "org.omg.CORBA_2_3.portable"))
-            .exporting(new ExportedPackage(m, "org.omg.CORBA.DynAnyPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.CORBA.ORBPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.CORBA.portable"))
-            .exporting(new ExportedPackage(m, "org.omg.CORBA.TypeCodePackage"))
-            .exporting(new ExportedPackage(m, "org.omg.CosNaming"))
-            .exporting(new ExportedPackage(m, "org.omg.CosNaming.NamingContextExtPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.CosNaming.NamingContextPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.Dynamic"))
-            .exporting(new ExportedPackage(m, "org.omg.DynamicAny"))
-            .exporting(new ExportedPackage(m, "org.omg.DynamicAny.DynAnyFactoryPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.DynamicAny.DynAnyPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.IOP"))
-            .exporting(new ExportedPackage(m, "org.omg.IOP.CodecFactoryPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.IOP.CodecPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.PortableInterceptor"))
-            .exporting(new ExportedPackage(m, "org.omg.PortableInterceptor.ORBInitInfoPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.PortableServer"))
-            .exporting(new ExportedPackage(m, "org.omg.PortableServer.CurrentPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.PortableServer.POAManagerPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.PortableServer.POAPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.PortableServer.portable"))
-            .exporting(new ExportedPackage(m, "org.omg.PortableServer.ServantLocatorPackage"))
-            .exporting(new ExportedPackage(m, "org.omg.SendingContext"))
-            .exporting(new ExportedPackage(m, "org.osgi.framework").with("version=1.4.0"))
-            .exporting(new ExportedPackage(m, "org.osgi.service.packageadmin").with("version=1.2.0"))
-            .exporting(new ExportedPackage(m, "org.osgi.service.startlevel").with("version=1.1.0"))
-            .exporting(new ExportedPackage(m, "org.osgi.service.url").with("version=1.0.0"))
-            .exporting(new ExportedPackage(m, "org.osgi.util.tracker").with("version=1.3.0"))
-            .exporting(new ExportedPackage(m, "org.w3c.dom"))
-            .exporting(new ExportedPackage(m, "org.w3c.dom.bootstrap"))
-            .exporting(new ExportedPackage(m, "org.w3c.dom.ls"))
-            .exporting(new ExportedPackage(m, "org.xml.sax"))
-            .exporting(new ExportedPackage(m, "org.xml.sax.ext"))
-            .exporting(new ExportedPackage(m, "org.xml.sax.helpers"))
+            .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"))
+//            .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"))
+//            .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"))
+//            .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"))
+//            .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"))
 // Optional
-            .exporting(new ExportedPackage(m, "com.sun.corba.ee.impl.orbutil.closure"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise.admin.servermgmt.services"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise.deployment.node"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise.security.jauth.callback"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise.web.connector.grizzly.algorithms"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise.web.connector.grizzly.ssl"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise.web.portunif"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise.web.portunif.util"))
-            .exporting(new ExportedPackage(m, "com.sun.enterprise.webservice.monitoring"))
-            .exporting(new ExportedPackage(m, "com.sun.jdi"))
-            .exporting(new ExportedPackage(m, "com.sun.jdi.connect"))
-            .exporting(new ExportedPackage(m, "com.sun.jdi.event"))
-            .exporting(new ExportedPackage(m, "com.sun.jdi.request"))
-            .exporting(new ExportedPackage(m, "com.sun.mail.util"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.datatype"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.datatype.xsd"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.grammar"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.grammar.trex"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.reader"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.reader.trex.ng"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.reader.util"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.util"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.verifier"))
-            .exporting(new ExportedPackage(m, "com.sun.msv.verifier.regexp"))
-            .exporting(new ExportedPackage(m, "com.sun.sql.rowset"))
-            .exporting(new ExportedPackage(m, "com.sun.syndication.feed"))
-            .exporting(new ExportedPackage(m, "com.sun.syndication.feed.atom"))
-            .exporting(new ExportedPackage(m, "com.sun.syndication.io"))
-            .exporting(new ExportedPackage(m, "com.sun.xml.bind.serializer"))
-            .exporting(new ExportedPackage(m, "com.sun.xml.bind.validator"))
-            .exporting(new ExportedPackage(m, "com.sun.xml.ws.spi.runtime"))
-            .exporting(new ExportedPackage(m, "groovy.lang"))
-            .exporting(new ExportedPackage(m, "groovy.util"))
-            .exporting(new ExportedPackage(m, "oracle.AQ"))
-            .exporting(new ExportedPackage(m, "oracle.spatial.geometry"))
-            .exporting(new ExportedPackage(m, "oracle.sql"))
-            .exporting(new ExportedPackage(m, "oracle.xdb"))
-            .exporting(new ExportedPackage(m, "oracle.xdb.dom"))
-            .exporting(new ExportedPackage(m, "oracle.xml.jaxp"))
-            .exporting(new ExportedPackage(m, "oracle.xml.parser.schema"))
-            .exporting(new ExportedPackage(m, "oracle.xml.parser.v2"))
-            .exporting(new ExportedPackage(m, "oracle.xml.util"))
-            .exporting(new ExportedPackage(m, "org.apache"))
-            .exporting(new ExportedPackage(m, "org.apache.avalon.framework.logger"))
-            .exporting(new ExportedPackage(m, "org.apache.coyote"))
-            .exporting(new ExportedPackage(m, "org.apache.log"))
-            .exporting(new ExportedPackage(m, "org.apache.log4j"))
-            .exporting(new ExportedPackage(m, "org.apache.tomcat.util.buf"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.eis").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.eis.interactions").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.exceptions").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.expressions").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.internal.databaseaccess").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.internal.expressions").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.internal.helper").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.internal.platform.database").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.internal.security").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.internal.sessions").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.oxm").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.oxm.record").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.oxm.schema").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.platform.database").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.platform.database.converters").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.platform.server").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.platform.xml").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.queries").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.eclipse.persistence.sessions").with("version=2.0.0.v20091031-r5713"))
-            .exporting(new ExportedPackage(m, "org.iso_relax.verifier.impl"))
-            .exporting(new ExportedPackage(m, "org.jdom"))
-            .exporting(new ExportedPackage(m, "org.jdom.input"))
-            .exporting(new ExportedPackage(m, "org.jdom.output"))
-            .exporting(new ExportedPackage(m, "org.mortbay.jetty.annotations"))
-            .exporting(new ExportedPackage(m, "org.mortbay.jetty.plus.annotation"))
-            .exporting(new ExportedPackage(m, "org.netbeans.api.db.explorer"))
-            .exporting(new ExportedPackage(m, "org.netbeans.api.db.explorer.support"))
-            .exporting(new ExportedPackage(m, "org.netbeans.api.progress"))
-            .exporting(new ExportedPackage(m, "org.netbeans.api.project"))
-            .exporting(new ExportedPackage(m, "org.netbeans.lib.ddl.impl"))
-            .exporting(new ExportedPackage(m, "org.netbeans.spi.project.ui.templates.support"))
-            .exporting(new ExportedPackage(m, "org.openide"))
-            .exporting(new ExportedPackage(m, "org.openide.actions"))
-            .exporting(new ExportedPackage(m, "org.openide.awt"))
-            .exporting(new ExportedPackage(m, "org.openide.filesystems"))
-            .exporting(new ExportedPackage(m, "org.openide.loaders"))
-            .exporting(new ExportedPackage(m, "org.openide.nodes"))
-            .exporting(new ExportedPackage(m, "org.openide.util"))
-            .exporting(new ExportedPackage(m, "org.openide.util.actions"))
-            .exporting(new ExportedPackage(m, "org.openide.util.datatransfer"))
-            .exporting(new ExportedPackage(m, "org.openide.windows"))
-            .exporting(new ExportedPackage(m, "sun.reflect"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.corba.ee.impl.orbutil.closure"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise.admin.servermgmt.services"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise.deployment.node"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise.security.jauth.callback"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise.web.connector.grizzly.algorithms"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise.web.connector.grizzly.ssl"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise.web.portunif"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise.web.portunif.util"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.enterprise.webservice.monitoring"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.jdi"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.jdi.connect"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.jdi.event"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.jdi.request"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.mail.util"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.datatype"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.datatype.xsd"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.grammar"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.grammar.trex"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.reader"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.reader.trex.ng"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.reader.util"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.util"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.verifier"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.msv.verifier.regexp"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.sql.rowset"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.syndication.feed"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.syndication.feed.atom"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.syndication.io"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.xml.bind.serializer"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.xml.bind.validator"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "com.sun.xml.ws.spi.runtime"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "groovy.lang"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "groovy.util"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.AQ"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.spatial.geometry"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.sql"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.xdb"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.xdb.dom"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.xml.jaxp"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.xml.parser.schema"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.xml.parser.v2"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "oracle.xml.util"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.apache"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.apache.avalon.framework.logger"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.apache.coyote"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.apache.log"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.apache.log4j"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.apache.tomcat.util.buf"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.eis").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.eis.interactions").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.exceptions").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.expressions").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.internal.databaseaccess").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.internal.expressions").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.internal.helper").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.internal.platform.database").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.internal.security").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.internal.sessions").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.oxm").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.oxm.record").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.oxm.schema").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.platform.database").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.platform.database.converters").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.platform.server").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.platform.xml").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.queries").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.eclipse.persistence.sessions").with("version=2.0.0.v20091031-r5713"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.iso_relax.verifier.impl"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.jdom"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.jdom.input"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.jdom.output"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.mortbay.jetty.annotations"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.mortbay.jetty.plus.annotation"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.netbeans.api.db.explorer"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.netbeans.api.db.explorer.support"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.netbeans.api.progress"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.netbeans.api.project"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.netbeans.lib.ddl.impl"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.netbeans.spi.project.ui.templates.support"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.actions"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.awt"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.filesystems"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.loaders"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.nodes"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.util"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.util.actions"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.util.datatransfer"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "org.openide.windows"))
+            .exporting(new CapabilityImpl(m, FelixCapability.PACKAGE_NAMESPACE, "sun.reflect"))
         );
         m.resolve(new ArrayList<Wire>());
 
@@ -518,8 +519,8 @@
         Module module = new Module(mp.getSymbolicName());
         try
         {
-            List<Capability> caps = new ArrayList<Capability>(Arrays.asList(mp.getCapabilities()));
-            List<Requirement> reqs = new ArrayList<Requirement>(Arrays.asList(mp.getRequirements()));
+            List<FelixCapability> caps = new ArrayList<FelixCapability>(Arrays.asList(mp.getCapabilities()));
+            List<FelixRequirement> reqs = new ArrayList<FelixRequirement>(Arrays.asList(mp.getRequirements()));
 
             if (!duplicates)
             {
@@ -536,9 +537,9 @@
         return module;
     }
 
-    private static ExportedPackage convertToExportedPackage(Module module, Capability cap)
+    private static CapabilityImpl convertToCapability(Module module, FelixCapability cap)
     {
-        ExportedPackage ep = new ExportedPackage(module, cap.getPackageName());
+        CapabilityImpl ep = new CapabilityImpl(module, Capability.PACKAGE_NAMESPACE, cap.getPackageName());
 
         R4Directive[] dirs = cap.getDirectives();
         for (int dirIdx = 0; (dirs != null) && (dirIdx < dirs.length); dirIdx++)
@@ -558,7 +559,7 @@
         R4Attribute[] attrs = cap.getAttributes();
         for (int attrIdx = 0; (attrs != null) && (attrIdx < attrs.length); attrIdx++)
         {
-            if (attrs[attrIdx].getName().equals(Capability.PACKAGE_PROPERTY))
+            if (attrs[attrIdx].getName().equals(FelixCapability.PACKAGE_PROPERTY))
             {
                 continue;
             }
@@ -575,9 +576,9 @@
         return ep;
     }
 
-    private static ImportedPackage convertToImportedPackage(Module module, Requirement req)
+    private static RequirementImpl convertToRequirement(Module module, FelixRequirement req)
     {
-        ImportedPackage ip = new ImportedPackage(req.getTargetName());
+        RequirementImpl ip = new RequirementImpl(Capability.PACKAGE_NAMESPACE, req.getTargetName());
 
         R4Directive[] dirs = req.getDirectives();
         for (int dirIdx = 0; (dirs != null) && (dirIdx < dirs.length); dirIdx++)
@@ -595,7 +596,7 @@
         R4Attribute[] attrs = req.getAttributes();
         for (int attrIdx = 0; (attrs != null) && (attrIdx < attrs.length); attrIdx++)
         {
-            if (attrs[attrIdx].getName().equals(Capability.PACKAGE_PROPERTY))
+            if (attrs[attrIdx].getName().equals(FelixCapability.PACKAGE_PROPERTY))
             {
                 continue;
             }
@@ -609,30 +610,30 @@
     }
 
     private static void removeOverlappingRequirements(
-        List<Capability> caps, List<Requirement> reqs)
+        List<FelixCapability> caps, List<FelixRequirement> reqs)
     {
-        for (Iterator<Capability> itCap = caps.iterator(); itCap.hasNext(); )
+        for (Iterator<FelixCapability> itCap = caps.iterator(); itCap.hasNext(); )
         {
-            Capability cap = itCap.next();
-            if (cap.getNamespace().equals(Capability.MODULE_NAMESPACE)
-                || cap.getNamespace().equals(Capability.HOST_NAMESPACE))
+            FelixCapability cap = itCap.next();
+            if (cap.getNamespace().equals(FelixCapability.MODULE_NAMESPACE)
+                || cap.getNamespace().equals(FelixCapability.HOST_NAMESPACE))
             {
                 continue;
             }
-            else if (!cap.getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            else if (!cap.getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 throw new RuntimeException("Unsupported capability: " + cap.getNamespace());
             }
 
-            for (Iterator<Requirement> itReq = reqs.iterator(); itReq.hasNext(); )
+            for (Iterator<FelixRequirement> itReq = reqs.iterator(); itReq.hasNext(); )
             {
-                Requirement req = itReq.next();
-                if (!req.getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+                FelixRequirement req = itReq.next();
+                if (!req.getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
                 {
                     // Generate invalid source for now.
                     throw new RuntimeException("Require-Bundle not supported.");
                 }
-                else if (!req.getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+                else if (!req.getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
                 {
                     System.out.println("Unsupported requirement: " + req.getNamespace());
                     System.exit(0);
@@ -647,38 +648,38 @@
         }
     }
 
-    private static void addCapabilities(Module module, List<Capability> caps)
+    private static void addCapabilities(Module module, List<FelixCapability> caps)
     {
         for (int capIdx = 0; (caps != null) && (capIdx < caps.size()); capIdx++)
         {
-            if (caps.get(capIdx).getNamespace().equals(Capability.MODULE_NAMESPACE)
-                || caps.get(capIdx).getNamespace().equals(Capability.HOST_NAMESPACE))
+            if (caps.get(capIdx).getNamespace().equals(FelixCapability.MODULE_NAMESPACE)
+                || caps.get(capIdx).getNamespace().equals(FelixCapability.HOST_NAMESPACE))
             {
                 continue;
             }
-            else if (!caps.get(capIdx).getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            else if (!caps.get(capIdx).getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 throw new RuntimeException("Unsupported capability: " + caps.get(capIdx).getNamespace());
             }
-            module.exporting(convertToExportedPackage(module, caps.get(capIdx)));
+            module.exporting(convertToCapability(module, caps.get(capIdx)));
         }
     }
 
-    private static void addRequirements(Module module, List<Requirement> reqs)
+    private static void addRequirements(Module module, List<FelixRequirement> reqs)
     {
         for (int reqIdx = 0; (reqs != null) && (reqIdx < reqs.size()); reqIdx++)
         {
-            if (!reqs.get(reqIdx).getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            if (!reqs.get(reqIdx).getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 // Generate invalid source for now.
                 throw new RuntimeException("Require-Bundle not supported.");
             }
-            else if (!reqs.get(reqIdx).getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            else if (!reqs.get(reqIdx).getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 System.out.println("Unsupported requirement: " + reqs.get(reqIdx).getNamespace());
                 System.exit(0);
             }
-            module.importing(convertToImportedPackage(module, reqs.get(reqIdx)));
+            module.importing(convertToRequirement(module, reqs.get(reqIdx)));
         }
     }
 }
\ No newline at end of file

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/ManifestParser.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/ManifestParser.java?rev=886175&r1=886174&r2=886175&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/ManifestParser.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/ManifestParser.java Wed Dec  2 15:34:56 2009
@@ -34,9 +34,9 @@
     private volatile boolean m_isExtension = false;
     private volatile String m_bundleSymbolicName;
     private volatile Version m_bundleVersion;
-    private volatile Capability[] m_capabilities;
-    private volatile Requirement[] m_requirements;
-    private volatile Requirement[] m_dynamicRequirements;
+    private volatile FelixCapability[] m_capabilities;
+    private volatile FelixRequirement[] m_requirements;
+    private volatile FelixRequirement[] m_dynamicRequirements;
     private volatile R4LibraryClause[] m_libraryHeaders;
     private volatile boolean m_libraryHeadersOptional = false;
 
@@ -84,7 +84,7 @@
         // Parse bundle symbolic name.
         //
 
-        Capability moduleCap = parseBundleSymbolicName(m_headerMap);
+        FelixCapability moduleCap = parseBundleSymbolicName(m_headerMap);
         if (moduleCap != null)
         {
             m_bundleSymbolicName = (String)
@@ -99,9 +99,9 @@
             if (headerMap.get(Constants.FRAGMENT_HOST) == null)
             {
                 capList.add(moduleCap);
-                capList.add(new Capability(
-                    Capability.HOST_NAMESPACE, null,
-                    ((Capability) moduleCap).getAttributes()));
+                capList.add(new FelixCapability(
+                    FelixCapability.HOST_NAMESPACE, null,
+                    ((FelixCapability) moduleCap).getAttributes()));
             }
         }
 
@@ -120,7 +120,7 @@
         //
 
         // Get exported packages from bundle manifest.
-        Capability[] exportCaps = parseExportHeader(
+        FelixCapability[] exportCaps = parseExportHeader(
             (String) headerMap.get(Constants.EXPORT_PACKAGE));
 
         // Verify that "java.*" packages are not exported.
@@ -128,7 +128,7 @@
         {
             // Verify that the named package has not already been declared.
             String pkgName = (String)
-                exportCaps[capIdx].getProperties().get(Capability.PACKAGE_PROPERTY);
+                exportCaps[capIdx].getProperties().get(FelixCapability.PACKAGE_PROPERTY);
             // Verify that java.* packages are not exported.
             if (pkgName.startsWith("java."))
             {
@@ -139,13 +139,13 @@
         }
 
         // Create an array of all capabilities.
-        m_capabilities = (Capability[]) capList.toArray(new Capability[capList.size()]);
+        m_capabilities = (FelixCapability[]) capList.toArray(new FelixCapability[capList.size()]);
 
         //
         // Parse Require-Bundle
         //
 
-        Requirement[] bundleReq = parseRequireBundleHeader(
+        FelixRequirement[] bundleReq = parseRequireBundleHeader(
             (String) headerMap.get(Constants.REQUIRE_BUNDLE));
         for (int reqIdx = 0; reqIdx < bundleReq.length; reqIdx++)
         {
@@ -157,7 +157,7 @@
         //
 
         // Get import packages from bundle manifest.
-        Requirement[] importReqs = parseImportHeader(
+        FelixRequirement[] importReqs = parseImportHeader(
             (String) headerMap.get(Constants.IMPORT_PACKAGE));
 
         // Verify there are no duplicate import declarations.
@@ -165,7 +165,7 @@
         for (int reqIdx = 0; reqIdx < importReqs.length; reqIdx++)
         {
             // Verify that the named package has not already been declared.
-            String pkgName = ((Requirement) importReqs[reqIdx]).getTargetName();
+            String pkgName = ((FelixRequirement) importReqs[reqIdx]).getTargetName();
             if (!dupeSet.contains(pkgName))
             {
                 // Verify that java.* packages are not imported.
@@ -186,7 +186,7 @@
         }
 
         // Create an array of all requirements.
-        m_requirements = (Requirement[]) reqList.toArray(new Requirement[reqList.size()]);
+        m_requirements = (FelixRequirement[]) reqList.toArray(new FelixRequirement[reqList.size()]);
 
         //
         // Parse DynamicImport-Package.
@@ -201,7 +201,7 @@
         for (int reqIdx = 0; reqIdx < m_dynamicRequirements.length; reqIdx++)
         {
             // Verify that java.* packages are not imported.
-            String pkgName = ((Requirement) m_dynamicRequirements[reqIdx]).getTargetName();
+            String pkgName = ((FelixRequirement) m_dynamicRequirements[reqIdx]).getTargetName();
             if (pkgName.startsWith("java."))
             {
                 throw new Exception(
@@ -289,17 +289,17 @@
         return m_bundleVersion;
     }
 
-    public Capability[] getCapabilities()
+    public FelixCapability[] getCapabilities()
     {
         return m_capabilities;
     }
 
-    public Requirement[] getRequirements()
+    public FelixRequirement[] getRequirements()
     {
         return m_requirements;
     }
 
-    public Requirement[] getDynamicRequirements()
+    public FelixRequirement[] getDynamicRequirements()
     {
         return m_dynamicRequirements;
     }
@@ -328,10 +328,10 @@
             (m_capabilities != null) && (capIdx < m_capabilities.length);
             capIdx++)
         {
-            if (m_capabilities[capIdx].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            if (m_capabilities[capIdx].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 // R3 bundles cannot have directives on their exports.
-                if (((Capability) m_capabilities[capIdx]).getDirectives().length != 0)
+                if (((FelixCapability) m_capabilities[capIdx]).getDirectives().length != 0)
                 {
                     throw new Exception("R3 exports cannot contain directives.");
                 }
@@ -341,38 +341,38 @@
                 // because the package class normalizes to "version" to avoid having
                 // future special cases. This could be changed if more strict behavior
                 // is required.
-                if (((Capability) m_capabilities[capIdx]).getAttributes() != null)
+                if (((FelixCapability) m_capabilities[capIdx]).getAttributes() != null)
                 {
                     // R3 package capabilities should only have name and
                     // version attributes.
                     R4Attribute pkgName = null;
-                    R4Attribute pkgVersion = new R4Attribute(Capability.VERSION_PROPERTY, Version.emptyVersion, false);
+                    R4Attribute pkgVersion = new R4Attribute(FelixCapability.VERSION_PROPERTY, Version.emptyVersion, false);
                     for (int attrIdx = 0;
-                        attrIdx < ((Capability) m_capabilities[capIdx]).getAttributes().length;
+                        attrIdx < ((FelixCapability) m_capabilities[capIdx]).getAttributes().length;
                         attrIdx++)
                     {
-                        if (((Capability) m_capabilities[capIdx]).getAttributes()[attrIdx]
-                            .getName().equals(Capability.PACKAGE_PROPERTY))
+                        if (((FelixCapability) m_capabilities[capIdx]).getAttributes()[attrIdx]
+                            .getName().equals(FelixCapability.PACKAGE_PROPERTY))
                         {
-                            pkgName = ((Capability) m_capabilities[capIdx]).getAttributes()[attrIdx];
+                            pkgName = ((FelixCapability) m_capabilities[capIdx]).getAttributes()[attrIdx];
                         }
-                        else if (((Capability) m_capabilities[capIdx]).getAttributes()[attrIdx]
-                            .getName().equals(Capability.VERSION_PROPERTY))
+                        else if (((FelixCapability) m_capabilities[capIdx]).getAttributes()[attrIdx]
+                            .getName().equals(FelixCapability.VERSION_PROPERTY))
                         {
-                            pkgVersion = ((Capability) m_capabilities[capIdx]).getAttributes()[attrIdx];
+                            pkgVersion = ((FelixCapability) m_capabilities[capIdx]).getAttributes()[attrIdx];
                         }
                         else
                         {
                             System.err.println(
                                 "Unknown R3 export attribute: "
-                                    + ((Capability) m_capabilities[capIdx]).getAttributes()[attrIdx].getName());
+                                    + ((FelixCapability) m_capabilities[capIdx]).getAttributes()[attrIdx].getName());
                         }
                     }
 
                     // Recreate the export to remove any other attributes
                     // and add version if missing.
-                    m_capabilities[capIdx] = new Capability(
-                        Capability.PACKAGE_NAMESPACE,
+                    m_capabilities[capIdx] = new FelixCapability(
+                        FelixCapability.PACKAGE_NAMESPACE,
                         null,
                         new R4Attribute[] { pkgName, pkgVersion } );
                 }
@@ -384,10 +384,10 @@
         // on their imports; ignore all unknown attributes.
         for (int reqIdx = 0; (m_requirements != null) && (reqIdx < m_requirements.length); reqIdx++)
         {
-            if (m_requirements[reqIdx].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            if (m_requirements[reqIdx].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 // R3 bundles cannot have directives on their imports.
-                if (((Requirement) m_requirements[reqIdx]).getDirectives().length != 0)
+                if (((FelixRequirement) m_requirements[reqIdx]).getDirectives().length != 0)
                 {
                     throw new Exception("R3 imports cannot contain directives.");
                 }
@@ -397,40 +397,40 @@
                 // because the package class normalizes to "version" to avoid having
                 // future special cases. This could be changed if more strict behavior
                 // is required.
-                if (((Requirement) m_requirements[reqIdx]).getAttributes() != null)
+                if (((FelixRequirement) m_requirements[reqIdx]).getAttributes() != null)
                 {
                     // R3 package requirements should only have name and
                     // version attributes.
                     R4Attribute pkgName = null;
                     R4Attribute pkgVersion =
-                        new R4Attribute(Capability.VERSION_PROPERTY,
+                        new R4Attribute(FelixCapability.VERSION_PROPERTY,
                             new VersionRange(Version.emptyVersion, true, null, true), false);
                     for (int attrIdx = 0;
-                        attrIdx < ((Requirement) m_requirements[reqIdx]).getAttributes().length;
+                        attrIdx < ((FelixRequirement) m_requirements[reqIdx]).getAttributes().length;
                         attrIdx++)
                     {
-                        if (((Requirement) m_requirements[reqIdx]).getAttributes()[attrIdx]
-                            .getName().equals(Capability.PACKAGE_PROPERTY))
+                        if (((FelixRequirement) m_requirements[reqIdx]).getAttributes()[attrIdx]
+                            .getName().equals(FelixCapability.PACKAGE_PROPERTY))
                         {
-                            pkgName = ((Requirement) m_requirements[reqIdx]).getAttributes()[attrIdx];
+                            pkgName = ((FelixRequirement) m_requirements[reqIdx]).getAttributes()[attrIdx];
                         }
-                        else if (((Requirement) m_requirements[reqIdx]).getAttributes()[attrIdx]
-                          .getName().equals(Capability.VERSION_PROPERTY))
+                        else if (((FelixRequirement) m_requirements[reqIdx]).getAttributes()[attrIdx]
+                          .getName().equals(FelixCapability.VERSION_PROPERTY))
                         {
-                            pkgVersion = ((Requirement) m_requirements[reqIdx]).getAttributes()[attrIdx];
+                            pkgVersion = ((FelixRequirement) m_requirements[reqIdx]).getAttributes()[attrIdx];
                         }
                         else
                         {
                             System.out.println(
                                 "Unknown R3 import attribute: "
-                                    + ((Requirement) m_requirements[reqIdx]).getAttributes()[attrIdx].getName());
+                                    + ((FelixRequirement) m_requirements[reqIdx]).getAttributes()[attrIdx].getName());
                         }
                     }
 
                     // Recreate the import to remove any other attributes
                     // and add version if missing.
-                    m_requirements[reqIdx] = new Requirement(
-                        Capability.PACKAGE_NAMESPACE,
+                    m_requirements[reqIdx] = new FelixRequirement(
+                        FelixCapability.PACKAGE_NAMESPACE,
                         null,
                         new R4Attribute[] { pkgName, pkgVersion });
                 }
@@ -444,21 +444,21 @@
         // Add existing imports.
         for (int i = 0; i < m_requirements.length; i++)
         {
-            if (m_requirements[i].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            if (m_requirements[i].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 map.put(
-                    ((Requirement) m_requirements[i]).getTargetName(),
+                    ((FelixRequirement) m_requirements[i]).getTargetName(),
                     m_requirements[i]);
             }
         }
         // Add import requirement for each export capability.
         for (int i = 0; i < m_capabilities.length; i++)
         {
-            if (m_capabilities[i].getNamespace().equals(Capability.PACKAGE_NAMESPACE) &&
-                (map.get(m_capabilities[i].getProperties().get(Capability.PACKAGE_PROPERTY)) == null))
+            if (m_capabilities[i].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE) &&
+                (map.get(m_capabilities[i].getProperties().get(FelixCapability.PACKAGE_PROPERTY)) == null))
             {
                 // Convert Version to VersionRange.
-                R4Attribute[] attrs = (R4Attribute[]) ((Capability) m_capabilities[i]).getAttributes().clone();
+                R4Attribute[] attrs = (R4Attribute[]) ((FelixCapability) m_capabilities[i]).getAttributes().clone();
                 for (int attrIdx = 0; (attrs != null) && (attrIdx < attrs.length); attrIdx++)
                 {
                     if (attrs[attrIdx].getName().equals(Constants.VERSION_ATTRIBUTE))
@@ -471,12 +471,12 @@
                 }
 
                 map.put(
-                    m_capabilities[i].getProperties().get(Capability.PACKAGE_PROPERTY),
-                    new Requirement(Capability.PACKAGE_NAMESPACE, null, attrs));
+                    m_capabilities[i].getProperties().get(FelixCapability.PACKAGE_PROPERTY),
+                    new FelixRequirement(FelixCapability.PACKAGE_NAMESPACE, null, attrs));
             }
         }
         m_requirements =
-            (Requirement[]) map.values().toArray(new Requirement[map.size()]);
+            (FelixRequirement[]) map.values().toArray(new FelixRequirement[map.size()]);
 
         // Add a "uses" directive onto each export of R3 bundles
         // that references every other import (which will include
@@ -486,23 +486,23 @@
         String usesValue = "";
         for (int i = 0; (m_requirements != null) && (i < m_requirements.length); i++)
         {
-            if (m_requirements[i].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            if (m_requirements[i].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 usesValue = usesValue
                     + ((usesValue.length() > 0) ? "," : "")
-                    + ((Requirement) m_requirements[i]).getTargetName();
+                    + ((FelixRequirement) m_requirements[i]).getTargetName();
             }
         }
         R4Directive uses = new R4Directive(
             Constants.USES_DIRECTIVE, usesValue);
         for (int i = 0; (m_capabilities != null) && (i < m_capabilities.length); i++)
         {
-            if (m_capabilities[i].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            if (m_capabilities[i].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
-                m_capabilities[i] = new Capability(
-                    Capability.PACKAGE_NAMESPACE,
+                m_capabilities[i] = new FelixCapability(
+                    FelixCapability.PACKAGE_NAMESPACE,
                     new R4Directive[] { uses },
-                    ((Capability) m_capabilities[i]).getAttributes());
+                    ((FelixCapability) m_capabilities[i]).getAttributes());
             }
         }
 
@@ -512,11 +512,11 @@
             (m_dynamicRequirements != null) && (i < m_dynamicRequirements.length);
             i++)
         {
-            if (((Requirement) m_dynamicRequirements[i]).getDirectives().length != 0)
+            if (((FelixRequirement) m_dynamicRequirements[i]).getDirectives().length != 0)
             {
                 throw new Exception("R3 dynamic imports cannot contain directives.");
             }
-            if (((Requirement) m_dynamicRequirements[i]).getAttributes().length != 0)
+            if (((FelixRequirement) m_dynamicRequirements[i]).getAttributes().length != 0)
             {
 //                throw new BundleException("R3 dynamic imports cannot contain attributes.");
             }
@@ -550,17 +550,17 @@
         }
     }
 
-    private static Capability[] checkAndNormalizeR4Exports(
-        Capability[] caps, String bsn, Version bv)
+    private static FelixCapability[] checkAndNormalizeR4Exports(
+        FelixCapability[] caps, String bsn, Version bv)
         throws Exception
     {
         // Verify that the exports do not specify bundle symbolic name
         // or bundle version.
         for (int i = 0; (caps != null) && (i < caps.length); i++)
         {
-            if (caps[i].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            if (caps[i].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
-                R4Attribute[] attrs = ((Capability) caps[i]).getAttributes();
+                R4Attribute[] attrs = ((FelixCapability) caps[i]).getAttributes();
                 for (int attrIdx = 0; attrIdx < attrs.length; attrIdx++)
                 {
                     // Find symbolic name and version attribute, if present.
@@ -580,9 +580,9 @@
                     Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, bsn, false);
                 newAttrs[attrs.length + 1] = new R4Attribute(
                     Constants.BUNDLE_VERSION_ATTRIBUTE, bv, false);
-                caps[i] = new Capability(
-                    Capability.PACKAGE_NAMESPACE,
-                    ((Capability) caps[i]).getDirectives(),
+                caps[i] = new FelixCapability(
+                    FelixCapability.PACKAGE_NAMESPACE,
+                    ((FelixCapability) caps[i]).getDirectives(),
                     newAttrs);
             }
         }
@@ -602,7 +602,7 @@
         }
     }
 
-    private static Capability parseBundleSymbolicName(Map headerMap)
+    private static FelixCapability parseBundleSymbolicName(Map headerMap)
         throws Exception
     {
         Object[][][] clauses = parseStandardHeader(
@@ -648,16 +648,16 @@
                 Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, symName, false);
             attrs[1] = new R4Attribute(
                 Constants.BUNDLE_VERSION_ATTRIBUTE, bundleVersion, false);
-            return new Capability(Capability.MODULE_NAMESPACE, (R4Directive[]) clauses[0][CLAUSE_DIRECTIVES_INDEX], attrs);
+            return new FelixCapability(FelixCapability.MODULE_NAMESPACE, (R4Directive[]) clauses[0][CLAUSE_DIRECTIVES_INDEX], attrs);
         }
 
         return null;
     }
 
-    public static Capability[] parseExportHeader(String header, String bsn, Version bv)
+    public static FelixCapability[] parseExportHeader(String header, String bsn, Version bv)
         throws Exception
     {
-        Capability[] caps = parseExportHeader(header);
+        FelixCapability[] caps = parseExportHeader(header);
         try
         {
             caps = checkAndNormalizeR4Exports(caps, bsn, bv);
@@ -669,7 +669,7 @@
         return caps;
     }
 
-    private static Capability[] parseExportHeader(String header)
+    private static FelixCapability[] parseExportHeader(String header)
     {
         Object[][][] clauses = parseStandardHeader(header);
 
@@ -749,23 +749,23 @@
                 R4Attribute[] attrs = (R4Attribute[]) clauses[clauseIdx][CLAUSE_ATTRIBUTES_INDEX];
                 R4Attribute[] newAttrs = new R4Attribute[attrs.length + 1];
                 newAttrs[0] = new R4Attribute(
-                    Capability.PACKAGE_PROPERTY,
+                    FelixCapability.PACKAGE_PROPERTY,
                     clauses[clauseIdx][CLAUSE_PATHS_INDEX][pathIdx], false);
                 System.arraycopy(attrs, 0, newAttrs, 1, attrs.length);
 
                 // Create package capability and add to capability list.
                 capList.add(
-                    new Capability(
-                        Capability.PACKAGE_NAMESPACE,
+                    new FelixCapability(
+                        FelixCapability.PACKAGE_NAMESPACE,
                         (R4Directive[]) clauses[clauseIdx][CLAUSE_DIRECTIVES_INDEX],
                         newAttrs));
             }
         }
 
-        return (Capability[]) capList.toArray(new Capability[capList.size()]);
+        return (FelixCapability[]) capList.toArray(new FelixCapability[capList.size()]);
     }
 
-    private static Requirement[] parseImportHeader(String header)
+    private static FelixRequirement[] parseImportHeader(String header)
     {
         Object[][][] clauses = parseStandardHeader(header);
 
@@ -848,23 +848,23 @@
                 R4Attribute[] attrs = (R4Attribute[]) clauses[clauseIdx][CLAUSE_ATTRIBUTES_INDEX];
                 R4Attribute[] newAttrs = new R4Attribute[attrs.length + 1];
                 newAttrs[0] = new R4Attribute(
-                    Capability.PACKAGE_PROPERTY,
+                    FelixCapability.PACKAGE_PROPERTY,
                     clauses[clauseIdx][CLAUSE_PATHS_INDEX][pathIdx], false);
                 System.arraycopy(attrs, 0, newAttrs, 1, attrs.length);
 
                 // Create package requirement and add to requirement list.
                 reqList.add(
-                    new Requirement(
-                        Capability.PACKAGE_NAMESPACE,
+                    new FelixRequirement(
+                        FelixCapability.PACKAGE_NAMESPACE,
                         (R4Directive[]) clauses[clauseIdx][CLAUSE_DIRECTIVES_INDEX],
                         newAttrs));
             }
         }
 
-        return (Requirement[]) reqList.toArray(new Requirement[reqList.size()]);
+        return (FelixRequirement[]) reqList.toArray(new FelixRequirement[reqList.size()]);
     }
 
-    private static Requirement[] parseRequireBundleHeader(String header)
+    private static FelixRequirement[] parseRequireBundleHeader(String header)
     {
         Object[][][] clauses = parseStandardHeader(header);
 
@@ -908,14 +908,14 @@
 
                 // Create package requirement and add to requirement list.
                 reqList.add(
-                    new Requirement(
-                        Capability.MODULE_NAMESPACE,
+                    new FelixRequirement(
+                        FelixCapability.MODULE_NAMESPACE,
                         (R4Directive[]) clauses[clauseIdx][CLAUSE_DIRECTIVES_INDEX],
                         newAttrs));
             }
         }
 
-        return (Requirement[]) reqList.toArray(new Requirement[reqList.size()]);
+        return (FelixRequirement[]) reqList.toArray(new FelixRequirement[reqList.size()]);
     }
 
     public static R4Directive parseExtensionBundleHeader(String header)

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/SourceMain.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/SourceMain.java?rev=886175&r1=886174&r2=886175&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/SourceMain.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/manifestparser/SourceMain.java Wed Dec  2 15:34:56 2009
@@ -110,16 +110,16 @@
         out.println("            );");
     }
 
-    private static void generateCapabilitiesSource(PrintStream out, Capability[] caps)
+    private static void generateCapabilitiesSource(PrintStream out, FelixCapability[] caps)
     {
         for (int capIdx = 0; (caps != null) && (capIdx < caps.length); capIdx++)
         {
-            if (caps[capIdx].getNamespace().equals(Capability.MODULE_NAMESPACE)
-                || caps[capIdx].getNamespace().equals(Capability.HOST_NAMESPACE))
+            if (caps[capIdx].getNamespace().equals(FelixCapability.MODULE_NAMESPACE)
+                || caps[capIdx].getNamespace().equals(FelixCapability.HOST_NAMESPACE))
             {
                 continue;
             }
-            else if (!caps[capIdx].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            else if (!caps[capIdx].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 System.out.println("Unsupported capability: " + caps[capIdx].getNamespace());
                 System.exit(0);
@@ -145,7 +145,7 @@
             R4Attribute[] attrs = caps[capIdx].getAttributes();
             for (int attrIdx = 0; (attrs != null) && (attrIdx < attrs.length); attrIdx++)
             {
-                if (attrs[attrIdx].getName().equals(Capability.PACKAGE_PROPERTY))
+                if (attrs[attrIdx].getName().equals(FelixCapability.PACKAGE_PROPERTY))
                 {
                     continue;
                 }
@@ -163,17 +163,17 @@
         }
     }
 
-    private static void generateRequirementsSource(PrintStream out, Requirement[] reqs)
+    private static void generateRequirementsSource(PrintStream out, FelixRequirement[] reqs)
     {
         for (int reqIdx = 0; (reqs != null) && (reqIdx < reqs.length); reqIdx++)
         {
-            if (!reqs[reqIdx].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            if (!reqs[reqIdx].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 // Generate invalid source for now.
                 out.println("require-bundle");
                 continue;
             }
-            else if (!reqs[reqIdx].getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            else if (!reqs[reqIdx].getNamespace().equals(FelixCapability.PACKAGE_NAMESPACE))
             {
                 System.out.println("Unsupported requirement: " + reqs[reqIdx].getNamespace());
                 System.exit(0);
@@ -197,7 +197,7 @@
             R4Attribute[] attrs = reqs[reqIdx].getAttributes();
             for (int attrIdx = 0; (attrs != null) && (attrIdx < attrs.length); attrIdx++)
             {
-                if (attrs[attrIdx].getName().equals(Capability.PACKAGE_PROPERTY))
+                if (attrs[attrIdx].getName().equals(FelixCapability.PACKAGE_PROPERTY))
                 {
                     continue;
                 }



Mime
View raw message