org.picocontainer.defaults
Class CustomPermissionsURLClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byjava.security.SecureClassLoader
          extended byjava.net.URLClassLoader
              extended byorg.picocontainer.defaults.CustomPermissionsURLClassLoader

public class CustomPermissionsURLClassLoader
extends URLClassLoader

CustomPermissionsURLClassLoader extends URLClassLoader, adding the abilty to programatically add permissions easily. To be effective for permission management, it should be run in conjunction with a policy that restricts some of the classloaders, but not all. It's not ordinarily used by PicoContainer, but is here because PicoContainer is common to most classloader trees.

Author:
Paul Hammant

Constructor Summary
CustomPermissionsURLClassLoader(URL[] urls, Map permissionsMap, ClassLoader parent)
           
 
Method Summary
protected  Class findClass(String name)
           
 PermissionCollection getPermissions(CodeSource codeSource)
           
 Class loadClass(String name)
           
 String toString()
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getURLs, newInstance, newInstance
 
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, wait, wait, wait
 

Constructor Detail

CustomPermissionsURLClassLoader

public CustomPermissionsURLClassLoader(URL[] urls,
                                       Map permissionsMap,
                                       ClassLoader parent)
Method Detail

loadClass

public Class loadClass(String name)
                throws ClassNotFoundException
Throws:
ClassNotFoundException

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Throws:
ClassNotFoundException

toString

public String toString()

getPermissions

public PermissionCollection getPermissions(CodeSource codeSource)


Copyright © 2003-2007 Codehaus. All Rights Reserved.