felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r372839 - /incubator/felix/sandbox/rickhall/framework-branch/src/main/java/org/apache/felix/framework/SystemBundleContentLoader.java
Date Fri, 27 Jan 2006 13:24:08 GMT
Author: rickhall
Date: Fri Jan 27 05:24:05 2006
New Revision: 372839

URL: http://svn.apache.org/viewcvs?rev=372839&view=rev
Log:
The system bundle content loader allows the system bundle to cleanly
load classes from the parent class loader.

Added:
    incubator/felix/sandbox/rickhall/framework-branch/src/main/java/org/apache/felix/framework/SystemBundleContentLoader.java
  (with props)

Added: incubator/felix/sandbox/rickhall/framework-branch/src/main/java/org/apache/felix/framework/SystemBundleContentLoader.java
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/rickhall/framework-branch/src/main/java/org/apache/felix/framework/SystemBundleContentLoader.java?rev=372839&view=auto
==============================================================================
--- incubator/felix/sandbox/rickhall/framework-branch/src/main/java/org/apache/felix/framework/SystemBundleContentLoader.java
(added)
+++ incubator/felix/sandbox/rickhall/framework-branch/src/main/java/org/apache/felix/framework/SystemBundleContentLoader.java
Fri Jan 27 05:24:05 2006
@@ -0,0 +1,64 @@
+/*
+ *   Copyright 2006 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.felix.framework;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.felix.moduleloader.*;
+
+public class SystemBundleContentLoader implements IContentLoader
+{
+    public IContent getContent()
+    {
+        return null;
+    }
+
+    public void setModuleCallback(IModuleCallback callback)
+    {
+    }
+
+    public IModuleCallback getModuleCallback()
+    {
+        return null;
+    }
+
+    public Class getClass(String name)
+    {
+        try
+        {
+            return getClass().getClassLoader().loadClass(name);
+        }
+        catch (ClassNotFoundException ex)
+        {
+// TODO: FIX LOGGING...SEARCH FOR printStackTrace and fix throughout.
+            ex.printStackTrace();
+            return null;
+        }
+    }
+
+    public URL getResource(String name)
+    {
+        return getClass().getClassLoader().getResource(name);
+    }
+
+    public InputStream getResourceAsStream(String name) throws IOException
+    {
+        return getClass().getClassLoader().getResourceAsStream(name);
+    }
+}
\ No newline at end of file

Propchange: incubator/felix/sandbox/rickhall/framework-branch/src/main/java/org/apache/felix/framework/SystemBundleContentLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message