org.picocontainer.security
Class CustomPermissionsURLClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.picocontainer.security.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
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
CustomPermissionsURLClassLoader
public CustomPermissionsURLClassLoader(URL[] urls,
Map<URL,Permissions> permissionsMap,
ClassLoader parent)
loadClass
public Class<?> loadClass(String name)
throws ClassNotFoundException
- Overrides:
loadClass
in class ClassLoader
- Throws:
ClassNotFoundException
findClass
protected Class<?> findClass(String name)
throws ClassNotFoundException
- Overrides:
findClass
in class URLClassLoader
- Throws:
ClassNotFoundException
toString
public String toString()
- Overrides:
toString
in class Object
getPermissions
public PermissionCollection getPermissions(CodeSource codeSource)
- Overrides:
getPermissions
in class URLClassLoader
Copyright © 2003-2010 Codehaus. All Rights Reserved.