Added a simple method to compare the module class loader's module manager
to a specified one; this was necessary for the framework to determine from
which bundle in which framework instance does a class originate.


git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@331743 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/org/apache/felix/moduleloader/ModuleClassLoader.java b/framework/src/org/apache/felix/moduleloader/ModuleClassLoader.java
index e10d685..5585979 100644
--- a/framework/src/org/apache/felix/moduleloader/ModuleClassLoader.java
+++ b/framework/src/org/apache/felix/moduleloader/ModuleClassLoader.java
@@ -118,6 +118,20 @@
 
     /**
      * <p>
+     * This method is only used by a framework instance so that it can determine
+     * if a given module class loader is for a module of a bundle inside of it;
+     * this is used for the URL Handlers service implementation.
+     * </p>
+     * @return <tt>true</tt> if the specified module manager is the same as
+     *         the one associated with this module class loader.
+    **/
+    public boolean isModuleManagerEqual(ModuleManager mgr)
+    {
+        return m_mgr == mgr;
+    }
+
+    /**
+     * <p>
      * This method is nearly an exact copy of the ClassLoader.loadClass()
      * method. The main difference is that it delegates to its associated
      * <tt>ModuleManager</tt>'s search policy before calling the