Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2009-01-12 20:59:42 +0000
committerThomas Watson2009-01-12 20:59:42 +0000
commite639a4510e0a3926d48ef68c3985ff9b1b6a529f (patch)
treec21d411a59c6e8566f3a1a58969fe8f247cf94fd /bundles/org.eclipse.osgi
parentd8ffd2a1f3745e87ec218924405bd83bd5df187a (diff)
downloadrt.equinox.framework-e639a4510e0a3926d48ef68c3985ff9b1b6a529f.tar.gz
rt.equinox.framework-e639a4510e0a3926d48ef68c3985ff9b1b6a529f.tar.xz
rt.equinox.framework-e639a4510e0a3926d48ef68c3985ff9b1b6a529f.zip
Bug 260254 [osgi r4.2] The bundle class loader must implement BundleReference
Diffstat (limited to 'bundles/org.eclipse.osgi')
-rw-r--r--bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleClassLoader.java5
-rw-r--r--bundles/org.eclipse.osgi/core/composite/org/eclipse/osgi/internal/composite/CompositeClassLoader.java7
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java7
3 files changed, 15 insertions, 4 deletions
diff --git a/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleClassLoader.java b/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleClassLoader.java
index a588f8be9..34c9602be 100644
--- a/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleClassLoader.java
+++ b/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleClassLoader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.io.IOException;
import java.net.URL;
import java.security.ProtectionDomain;
import java.util.Enumeration;
+import org.osgi.framework.BundleReference;
/**
* The BundleClassLoader interface is used by the Framework to load local
@@ -31,7 +32,7 @@ import java.util.Enumeration;
* @since 3.1
* @see org.eclipse.osgi.framework.adaptor.BundleData#createClassLoader(ClassLoaderDelegate, BundleProtectionDomain, String[])
*/
-public interface BundleClassLoader /*extends ClassLoader*/{
+public interface BundleClassLoader /*extends ClassLoader*/extends BundleReference {
/**
* Initializes the ClassLoader. This is called after all currently resolved fragment
diff --git a/bundles/org.eclipse.osgi/core/composite/org/eclipse/osgi/internal/composite/CompositeClassLoader.java b/bundles/org.eclipse.osgi/core/composite/org/eclipse/osgi/internal/composite/CompositeClassLoader.java
index ab2a6d772..65f27951f 100644
--- a/bundles/org.eclipse.osgi/core/composite/org/eclipse/osgi/internal/composite/CompositeClassLoader.java
+++ b/bundles/org.eclipse.osgi/core/composite/org/eclipse/osgi/internal/composite/CompositeClassLoader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@ import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
import org.eclipse.osgi.baseadaptor.loader.*;
import org.eclipse.osgi.framework.adaptor.BundleData;
import org.eclipse.osgi.framework.adaptor.ClassLoaderDelegate;
+import org.osgi.framework.Bundle;
public class CompositeClassLoader extends ClassLoader implements BaseClassLoader {
@@ -139,4 +140,8 @@ public class CompositeClassLoader extends ClassLoader implements BaseClassLoader
private void stopLoading(String name) {
((Set) beingLoaded.get()).remove(name);
}
+
+ public Bundle getBundle() {
+ return manager.getBaseData().getBundle();
+ }
}
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
index 80ca4006e..ce1e8d1ea 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.osgi.framework.debug.Debug;
import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
import org.eclipse.osgi.signedcontent.SignedContent;
import org.eclipse.osgi.signedcontent.SignerInfo;
+import org.osgi.framework.Bundle;
/**
* The default implemention of <code>BaseClassLoader</code>. This implementation extends
@@ -244,4 +245,8 @@ public class DefaultClassLoader extends ClassLoader implements BaseClassLoader {
public ClasspathManager getClasspathManager() {
return manager;
}
+
+ public Bundle getBundle() {
+ return manager.getBaseData().getBundle();
+ }
}

Back to the top