net.larsan.urd.archive
Class SharedSpaceLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--java.security.SecureClassLoader
              |
              +--net.larsan.urd.util.ResourceClassLoader
                    |
                    +--net.larsan.urd.archive.SharedSpaceLoader
All Implemented Interfaces:
SharedSpace

public class SharedSpaceLoader
extends ResourceClassLoader
implements SharedSpace

The shared space loader is a class loader for exported packages in the Norna framework. This class loader lives as long as the framework. It checks access to classes using a PackagePermission.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson
See Also:
net.larsan.norna.PackagePermission

Field Summary
 
Fields inherited from class net.larsan.urd.util.ResourceClassLoader
locator
 
Constructor Summary
SharedSpaceLoader(java.lang.ClassLoader parent)
          Create class loader with a parent.
 
Method Summary
 Exporter getExporter()
          Get exporter to use for exporting packages into the shared class space.
 java.lang.ClassLoader getLoader()
          Get shared class loader, this returns the outer class instance
 java.lang.Class loadClass(java.lang.String name)
          Load a class.
 
Methods inherited from class net.larsan.urd.util.ResourceClassLoader
findClass, findResource, findResources, getCodeSource, getPermissions
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedSpaceLoader

public SharedSpaceLoader(java.lang.ClassLoader parent)
Create class loader with a parent.

Method Detail

loadClass

public java.lang.Class loadClass(java.lang.String name)
                          throws java.lang.ClassNotFoundException
Load a class. This method checks with an installed security manager for package "load" permission on the given package.

Overrides:
loadClass in class ResourceClassLoader
Parameters:
name - Class name to load
Returns:
A class object
Throws:
java.lang.ClassNotFoundException - If the class is not found

getLoader

public java.lang.ClassLoader getLoader()
Get shared class loader, this returns the outer class instance

Specified by:
getLoader in interface SharedSpace

getExporter

public Exporter getExporter()
Get exporter to use for exporting packages into the shared class space.

Specified by:
getExporter in interface SharedSpace