|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.ClassLoader | +--java.security.SecureClassLoader | +--java.net.URLClassLoader | +--net.drijf.javaone.DelegatingCL
Implements a class loader that uses the delegating policy to assign
permissions. Furthermore, a class is checked for
ClassLoadPermission
during loading.
ClassLoadPermission
Constructor Summary | |
DelegatingCL(java.net.URL[] urls,
java.lang.ClassLoader parent,
java.security.Policy policy)
Construct a new delegating URL classloader, given a policy. |
Method Summary | |
protected java.lang.Class |
findClass(java.lang.String name)
Find a class, with an additional check on ClassLoadPermission . |
protected java.security.PermissionCollection |
getPermissions(java.security.CodeSource cs)
Return the permission associated with a codesource according to the policy associated with this classloader. |
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 |
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DelegatingCL(java.net.URL[] urls, java.lang.ClassLoader parent, java.security.Policy policy)
urls
- the urls to look for classes.parent
- the parent class loader.policy
- the policy to use when determining permissions.Method Detail |
protected java.lang.Class findClass(java.lang.String name) throws java.lang.ClassNotFoundException
ClassLoadPermission
.findClass
in class java.net.URLClassLoader
name
- the name of the class to load.Class
object.java.lang.ClassNotFoundException
- if either the class could not be
found, or the class is denied ClassLoadPermission
.ClassLoadPermission
protected java.security.PermissionCollection getPermissions(java.security.CodeSource cs)
getPermissions
in class java.net.URLClassLoader
cs
- the code source to return the permissions for.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |