felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1080256 - in /felix/trunk/framework/src/main/java/org/apache/felix/framework: ./ resolver/
Date Thu, 10 Mar 2011 15:55:09 GMT
Author: rickhall
Date: Thu Mar 10 15:55:09 2011
New Revision: 1080256

URL: http://svn.apache.org/viewvc?rev=1080256&view=rev
Log:
Rename and slightly refactor some classes to make their purpose more
obvious. (FELIX-2858)

Added:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostModule.java
      - copied, changed from r1080242, felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedModule.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java
      - copied, changed from r1080242, felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedCapability.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java
      - copied, changed from r1080242, felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedRequirement.java
Removed:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedCapability.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedModule.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedRequirement.java
Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java?rev=1080256&r1=1080255&r2=1080256&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java Thu Mar
10 15:55:09 2011
@@ -49,6 +49,8 @@ import org.apache.felix.framework.capabi
 import org.apache.felix.framework.capabilityset.Requirement;
 import org.apache.felix.framework.capabilityset.SimpleFilter;
 import org.apache.felix.framework.resolver.Content;
+import org.apache.felix.framework.resolver.HostedCapability;
+import org.apache.felix.framework.resolver.HostedRequirement;
 import org.apache.felix.framework.resolver.Module;
 import org.apache.felix.framework.resolver.ResolveException;
 import org.apache.felix.framework.resolver.ResourceNotFoundException;
@@ -60,7 +62,6 @@ import org.apache.felix.framework.util.F
 import org.apache.felix.framework.util.SecureAction;
 import org.apache.felix.framework.util.SecurityManagerEx;
 import org.apache.felix.framework.util.Util;
-import org.apache.felix.framework.util.manifestparser.CapabilityImpl;
 import org.apache.felix.framework.util.manifestparser.ManifestParser;
 import org.apache.felix.framework.util.manifestparser.R4Library;
 import org.apache.felix.framework.util.manifestparser.RequirementImpl;
@@ -312,11 +313,7 @@ public class ModuleImpl implements Modul
                     if (caps.get(capIdx).getNamespace().equals(Capability.PACKAGE_NAMESPACE))
                     {
                         capList.add(
-                            new CapabilityImpl(
-                                this,
-                                caps.get(capIdx).getNamespace(),
-                                caps.get(capIdx).getDirectives(),
-                                caps.get(capIdx).getAttributes()));
+                            new HostedCapability(this, caps.get(capIdx)));
                     }
                 }
             }
@@ -344,8 +341,7 @@ public class ModuleImpl implements Modul
                         || reqs.get(reqIdx).getNamespace().equals(Capability.MODULE_NAMESPACE))
                     {
                         reqList.add(
-                            new FragmentRequirement(
-                                this, reqs.get(reqIdx)));
+                            new HostedRequirement(this, reqs.get(reqIdx)));
                     }
                 }
             }
@@ -403,7 +399,7 @@ public class ModuleImpl implements Modul
             // We need to return null here if we don't have any libraries, since a
             // zero-length array is used to indicate that matching native libraries
             // could not be found when resolving the bundle.
-            result = (nativeList.size() == 0)
+            result = (nativeList.isEmpty())
                 ? null
                 : Collections.unmodifiableList(nativeList);
         }
@@ -2438,56 +2434,4 @@ public class ModuleImpl implements Modul
 
         return sb.toString();
     }
-
-    static class FragmentRequirement implements Requirement
-    {
-        private final Module m_owner;
-        private final Requirement m_fragmentReq;
-
-        public FragmentRequirement(Module owner, Requirement fragmentReq)
-        {
-            m_owner = owner;
-            m_fragmentReq = fragmentReq;
-        }
-
-        public Module getFragment()
-        {
-            return m_fragmentReq.getModule();
-        }
-
-        public Module getModule()
-        {
-            return m_owner;
-        }
-
-        public String getNamespace()
-        {
-            return m_fragmentReq.getNamespace();
-        }
-
-        public SimpleFilter getFilter()
-        {
-            return m_fragmentReq.getFilter();
-        }
-
-        public boolean isOptional()
-        {
-            return m_fragmentReq.isOptional();
-        }
-
-        public Directive getDirective(String name)
-        {
-            return m_fragmentReq.getDirective(name);
-        }
-
-        public List<Directive> getDirectives()
-        {
-            return m_fragmentReq.getDirectives();
-        }
-
-        public String toString()
-        {
-            return m_fragmentReq.toString();
-        }
-    }
 }
\ No newline at end of file

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java?rev=1080256&r1=1080255&r2=1080256&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
Thu Mar 10 15:55:09 2011
@@ -55,7 +55,7 @@ public class Candidates
     private final Map<Capability, Map<String, Map<Version, List<Requirement>>>>
m_hostFragments;
     // Maps a module to its associated wrapped module; this only happens
     // when a module being resolved has fragments to attach to it.
-    private final Map<Module, WrappedModule> m_allWrappedHosts;
+    private final Map<Module, HostModule> m_allWrappedHosts;
     // Map used when populating candidates to hold intermediate and final results.
     Map<Module, Object> m_populateResultCache;
 
@@ -73,7 +73,7 @@ public class Candidates
         Map<Capability, Set<Requirement>> dependentMap,
         Map<Requirement, SortedSet<Capability>> candidateMap,
         Map<Capability, Map<String, Map<Version, List<Requirement>>>>
hostFragments,
-        Map<Module, WrappedModule> wrappedHosts, Map<Module, Object> populateResultCache)
+        Map<Module, HostModule> wrappedHosts, Map<Module, Object> populateResultCache)
     {
         m_root = root;
         m_candidateModules = candidateModules;
@@ -97,7 +97,7 @@ public class Candidates
         m_candidateMap = new HashMap<Requirement, SortedSet<Capability>>();
         m_hostFragments =
             new HashMap<Capability, Map<String, Map<Version, List<Requirement>>>>();
-        m_allWrappedHosts = new HashMap<Module, WrappedModule>();
+        m_allWrappedHosts = new HashMap<Module, HostModule>();
         m_populateResultCache = new HashMap<Module, Object>();
 
         populate(state, m_root);
@@ -122,7 +122,7 @@ public class Candidates
         m_candidateMap = new HashMap<Requirement, SortedSet<Capability>>();
         m_hostFragments =
             new HashMap<Capability, Map<String, Map<Version, List<Requirement>>>>();
-        m_allWrappedHosts = new HashMap<Module, WrappedModule>();
+        m_allWrappedHosts = new HashMap<Module, HostModule>();
         m_populateResultCache = new HashMap<Module, Object>();
 
         add(req, candidates);
@@ -546,7 +546,7 @@ public class Candidates
         //      with host's attached fragment capabilities.
 
         // Steps 1 and 2
-        List<WrappedModule> wrappedHosts = new ArrayList<WrappedModule>();
+        List<HostModule> wrappedHosts = new ArrayList<HostModule>();
         List<Module> unselectedFragments = new ArrayList<Module>();
         for (Entry<Capability, Map<String, Map<Version, List<Requirement>>>>
hostEntry :
             m_hostFragments.entrySet())
@@ -590,7 +590,7 @@ public class Candidates
             }
 
             // Step 2
-            WrappedModule wrappedHost = new WrappedModule(hostCap.getModule(), selectedFragments);
+            HostModule wrappedHost = new HostModule(hostCap.getModule(), selectedFragments);
             wrappedHosts.add(wrappedHost);
             m_allWrappedHosts.put(hostCap.getModule(), wrappedHost);
         }
@@ -602,20 +602,20 @@ public class Candidates
         }
 
         // Step 4
-        for (WrappedModule wrappedHost : wrappedHosts)
+        for (HostModule wrappedHost : wrappedHosts)
         {
             // Replaces capabilities from fragments with the capabilities
             // from the merged host.
             for (Capability c : wrappedHost.getCapabilities())
             {
                 Set<Requirement> dependents =
-                    m_dependentMap.get(((WrappedCapability) c).getWrappedCapability());
+                    m_dependentMap.get(((HostedCapability) c).getDeclaredCapability());
                 if (dependents != null)
                 {
                     for (Requirement r : dependents)
                     {
                         Set<Capability> cands = m_candidateMap.get(r);
-                        cands.remove(((WrappedCapability) c).getWrappedCapability());
+                        cands.remove(((HostedCapability) c).getDeclaredCapability());
                         cands.add(c);
                     }
                 }
@@ -627,7 +627,7 @@ public class Candidates
             for (Requirement r : wrappedHost.getRequirements())
             {
                 SortedSet<Capability> cands =
-                    m_candidateMap.get(((WrappedRequirement) r).getWrappedRequirement());
+                    m_candidateMap.get(((HostedRequirement) r).getDeclaredRequirement());
                 if (cands != null)
                 {
                     m_candidateMap.put(r, new TreeSet<Capability>(cands));

Copied: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostModule.java
(from r1080242, felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedModule.java)
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostModule.java?p2=felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostModule.java&p1=felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedModule.java&r1=1080242&r2=1080256&rev=1080256&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedModule.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostModule.java
Thu Mar 10 15:55:09 2011
@@ -32,22 +32,22 @@ import org.apache.felix.framework.util.m
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Version;
 
-class WrappedModule implements Module
+class HostModule implements Module
 {
-    private final Module m_module;
+    private final Module m_host;
     private final List<Module> m_fragments;
     private List<Capability> m_cachedCapabilities = null;
     private List<Requirement> m_cachedRequirements = null;
 
-    public WrappedModule(Module module, List<Module> fragments)
+    public HostModule(Module module, List<Module> fragments)
     {
-        m_module = module;
+        m_host = module;
         m_fragments = fragments;
     }
 
-    public Module getWrappedModule()
+    public Module getHost()
     {
-        return m_module;
+        return m_host;
     }
 
     public List<Module> getFragments()
@@ -57,7 +57,7 @@ class WrappedModule implements Module
 
     public String getId()
     {
-        return m_module.getId();
+        return m_host.getId();
     }
 
     public List<Capability> getCapabilities()
@@ -67,13 +67,13 @@ class WrappedModule implements Module
             List<Capability> capList = new ArrayList<Capability>();
 
             // Wrap host capabilities.
-            List<Capability> caps = m_module.getCapabilities();
+            List<Capability> caps = m_host.getCapabilities();
             for (int capIdx = 0;
                 (caps != null) && (capIdx < caps.size());
                 capIdx++)
             {
                 capList.add(
-                    new WrappedCapability(this, caps.get(capIdx)));
+                    new HostedCapability(this, caps.get(capIdx)));
             }
 
             // Wrap fragment capabilities.
@@ -89,7 +89,7 @@ class WrappedModule implements Module
                     if (caps.get(capIdx).getNamespace().equals(Capability.PACKAGE_NAMESPACE))
                     {
                         capList.add(
-                            new WrappedCapability(this, caps.get(capIdx)));
+                            new HostedCapability(this, caps.get(capIdx)));
                     }
                 }
             }
@@ -105,13 +105,13 @@ class WrappedModule implements Module
             List<Requirement> reqList = new ArrayList<Requirement>();
 
             // Wrap host requirements.
-            List<Requirement> reqs = m_module.getRequirements();
+            List<Requirement> reqs = m_host.getRequirements();
             for (int reqIdx = 0;
                 (reqs != null) && (reqIdx < reqs.size());
                 reqIdx++)
             {
                 reqList.add(
-                    new WrappedRequirement(this, reqs.get(reqIdx)));
+                    new HostedRequirement(this, reqs.get(reqIdx)));
             }
 
             // Wrap fragment requirements.
@@ -128,7 +128,7 @@ class WrappedModule implements Module
                         || reqs.get(reqIdx).getNamespace().equals(Capability.MODULE_NAMESPACE))
                     {
                         reqList.add(
-                            new WrappedRequirement(this, reqs.get(reqIdx)));
+                            new HostedRequirement(this, reqs.get(reqIdx)));
                     }
                 }
             }
@@ -139,7 +139,7 @@ class WrappedModule implements Module
 
     public String toString()
     {
-        return m_module.getId();
+        return m_host.getId();
     }
 
     public Map getHeaders()
@@ -154,7 +154,7 @@ class WrappedModule implements Module
 
     public String getSymbolicName()
     {
-        return m_module.getSymbolicName();
+        return m_host.getSymbolicName();
     }
 
     public Version getVersion()
@@ -179,7 +179,7 @@ class WrappedModule implements Module
 
     public Bundle getBundle()
     {
-        return m_module.getBundle();
+        return m_host.getBundle();
     }
 
     public List<Wire> getWires()
@@ -199,7 +199,7 @@ class WrappedModule implements Module
 
     public boolean isRemovalPending()
     {
-        return m_module.isRemovalPending();
+        return m_host.isRemovalPending();
     }
 
     public Content getContent()

Copied: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java
(from r1080242, felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedCapability.java)
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java?p2=felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java&p1=felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedCapability.java&r1=1080242&r2=1080256&rev=1080256&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedCapability.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java
Thu Mar 10 15:55:09 2011
@@ -23,25 +23,57 @@ import org.apache.felix.framework.capabi
 import org.apache.felix.framework.capabilityset.Capability;
 import org.apache.felix.framework.capabilityset.Directive;
 
-class WrappedCapability implements Capability
+public class HostedCapability implements Capability
 {
-    private final Module m_module;
+    private final Module m_host;
     private final Capability m_cap;
 
-    public WrappedCapability(Module module, Capability cap)
+    public HostedCapability(Module module, Capability cap)
     {
-        m_module = module;
+        m_host = module;
         m_cap = cap;
     }
 
-    public Capability getWrappedCapability()
+    @Override
+    public boolean equals(Object obj)
+    {
+        if (obj == null)
+        {
+            return false;
+        }
+        if (getClass() != obj.getClass())
+        {
+            return false;
+        }
+        final HostedCapability other = (HostedCapability) obj;
+        if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host)))
+        {
+            return false;
+        }
+        if (m_cap != other.m_cap && (m_cap == null || !m_cap.equals(other.m_cap)))
+        {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = 37 * hash + (m_host != null ? m_host.hashCode() : 0);
+        hash = 37 * hash + (m_cap != null ? m_cap.hashCode() : 0);
+        return hash;
+    }
+
+    public Capability getDeclaredCapability()
     {
         return m_cap;
     }
 
     public Module getModule()
     {
-        return m_module;
+        return m_host;
     }
 
     public String getNamespace()
@@ -74,17 +106,18 @@ class WrappedCapability implements Capab
         return m_cap.getUses();
     }
 
+    @Override
     public String toString()
     {
-        if (m_module == null)
+        if (m_host == null)
         {
             return getAttributes().toString();
         }
         if (getNamespace().equals(Capability.PACKAGE_NAMESPACE))
         {
-            return "[" + m_module + "] "
+            return "[" + m_host + "] "
                 + getNamespace() + "; " + getAttribute(Capability.PACKAGE_ATTR);
         }
-        return "[" + m_module + "] " + getNamespace() + "; " + getAttributes();
+        return "[" + m_host + "] " + getNamespace() + "; " + getAttributes();
     }
 }
\ No newline at end of file

Copied: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java
(from r1080242, felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedRequirement.java)
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java?p2=felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java&p1=felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedRequirement.java&r1=1080242&r2=1080256&rev=1080256&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WrappedRequirement.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java
Thu Mar 10 15:55:09 2011
@@ -23,25 +23,57 @@ import org.apache.felix.framework.capabi
 import org.apache.felix.framework.capabilityset.Requirement;
 import org.apache.felix.framework.capabilityset.SimpleFilter;
 
-class WrappedRequirement implements Requirement
+public class HostedRequirement implements Requirement
 {
-    private final Module m_module;
+    private final Module m_host;
     private final Requirement m_req;
 
-    public WrappedRequirement(Module module, Requirement req)
+    public HostedRequirement(Module module, Requirement req)
     {
-        m_module = module;
+        m_host = module;
         m_req = req;
     }
 
-    public Requirement getWrappedRequirement()
+    @Override
+    public boolean equals(Object obj)
+    {
+        if (obj == null)
+        {
+            return false;
+        }
+        if (getClass() != obj.getClass())
+        {
+            return false;
+        }
+        final HostedRequirement other = (HostedRequirement) obj;
+        if (m_host != other.m_host && (m_host == null || !m_host.equals(other.m_host)))
+        {
+            return false;
+        }
+        if (m_req != other.m_req && (m_req == null || !m_req.equals(other.m_req)))
+        {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = 37 * hash + (m_host != null ? m_host.hashCode() : 0);
+        hash = 37 * hash + (m_req != null ? m_req.hashCode() : 0);
+        return hash;
+    }
+
+    public Requirement getDeclaredRequirement()
     {
         return m_req;
     }
 
     public Module getModule()
     {
-        return m_module;
+        return m_host;
     }
 
     public String getNamespace()
@@ -71,6 +103,6 @@ class WrappedRequirement implements Requ
 
     public String toString()
     {
-        return "[" + m_module + "] " + getNamespace() + "; " + getFilter().toString();
+        return "[" + m_host + "] " + getNamespace() + "; " + getFilter().toString();
     }
 }
\ No newline at end of file

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java?rev=1080256&r1=1080255&r2=1080256&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
Thu Mar 10 15:55:09 2011
@@ -146,11 +146,11 @@ public class ResolverImpl implements Res
                     if (rethrow != null)
                     {
                         Module faultyModule = getActualModule(rethrow.getModule());
-                        if (rethrow.getRequirement() instanceof WrappedRequirement)
+                        if (rethrow.getRequirement() instanceof HostedRequirement)
                         {
                             faultyModule =
-                                ((WrappedRequirement) rethrow.getRequirement())
-                                    .getWrappedRequirement().getModule();
+                                ((HostedRequirement) rethrow.getRequirement())
+                                    .getDeclaredRequirement().getModule();
                         }
                         if (fragments.remove(faultyModule))
                         {
@@ -281,11 +281,11 @@ public class ResolverImpl implements Res
                     if (rethrow != null)
                     {
                         Module faultyModule = getActualModule(rethrow.getModule());
-                        if (rethrow.getRequirement() instanceof WrappedRequirement)
+                        if (rethrow.getRequirement() instanceof HostedRequirement)
                         {
                             faultyModule =
-                                ((WrappedRequirement) rethrow.getRequirement())
-                                    .getWrappedRequirement().getModule();
+                                ((HostedRequirement) rethrow.getRequirement())
+                                    .getDeclaredRequirement().getModule();
                         }
                         if (fragments.remove(faultyModule))
                         {
@@ -485,7 +485,7 @@ public class ResolverImpl implements Res
                 Requirement r = wire.getRequirement();
                 if (!r.getModule().equals(wire.getImporter()))
                 {
-                    r = new WrappedRequirement(wire.getImporter(), r);
+                    r = new HostedRequirement(wire.getImporter(), r);
                 }
                 // Wrap the capability as a hosted capability
                 // if it comes from a fragment, since we will need
@@ -493,7 +493,7 @@ public class ResolverImpl implements Res
                 Capability c = wire.getCapability();
                 if (!c.getModule().equals(wire.getExporter()))
                 {
-                    c = new WrappedCapability(wire.getExporter(), c);
+                    c = new HostedCapability(wire.getExporter(), c);
                 }
                 reqs.add(r);
                 caps.add(c);
@@ -1291,27 +1291,27 @@ public class ResolverImpl implements Res
 
     private static Module getActualModule(Module m)
     {
-        if (m instanceof WrappedModule)
+        if (m instanceof HostModule)
         {
-            return ((WrappedModule) m).getWrappedModule();
+            return ((HostModule) m).getHost();
         }
         return m;
     }
 
     private static Capability getActualCapability(Capability c)
     {
-        if (c instanceof WrappedCapability)
+        if (c instanceof HostedCapability)
         {
-            return ((WrappedCapability) c).getWrappedCapability();
+            return ((HostedCapability) c).getDeclaredCapability();
         }
         return c;
     }
 
     private static Requirement getActualRequirement(Requirement r)
     {
-        if (r instanceof WrappedRequirement)
+        if (r instanceof HostedRequirement)
         {
-            return ((WrappedRequirement) r).getWrappedRequirement();
+            return ((HostedRequirement) r).getDeclaredRequirement();
         }
         return r;
     }
@@ -1370,9 +1370,9 @@ public class ResolverImpl implements Res
             wireMap.put(unwrappedModule, packageWires);
 
             // Add host wire for any fragments.
-            if (module instanceof WrappedModule)
+            if (module instanceof HostModule)
             {
-                List<Module> fragments = ((WrappedModule) module).getFragments();
+                List<Module> fragments = ((HostModule) module).getFragments();
                 for (Module fragment : fragments)
                 {
                     List<Wire> hostWires = wireMap.get(fragment);



Mime
View raw message