|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
org.dvb.lang.DVBClassLoader
This class loader is used to load classes and resources from a search path of URLs referring to locations where Java class files may be stored.
The classes that are loaded are by default only allowed to load code through the parent classloader, or from the URLs specified when the DVBClassLoader was created.
Constructor Summary | |
DVBClassLoader(java.net.URL[] urls)
Constructs a new DVBClassLoader for the given URLs. |
|
DVBClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent)
Constructs a new DVBClassLoader for the given URLs. |
Method Summary | |
protected java.lang.Class |
findClass(java.lang.String name)
Finds and loads the class with the specified name from the URL search path. |
static DVBClassLoader |
newInstance(java.net.URL[] urls)
Creates a new instance of DVBClassLoader for the specified URLs. |
static DVBClassLoader |
newInstance(java.net.URL[] urls,
java.lang.ClassLoader parent)
Creates a new instance of DVBClassLoader for the specified URLs. |
Methods inherited from class java.security.SecureClassLoader |
defineClass, getPermissions |
Methods inherited from class java.lang.ClassLoader |
defineClass, defineClass, defineClass, findLoadedClass, findSystemClass, getResource, getResourceAsStream, getSystemResource, getSystemResourceAsStream, 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 DVBClassLoader(java.net.URL[] urls)
If there is a security manager, this method first calls the
security manager's checkCreateClassLoader
method to ensure creation of a class loader is allowed.
urls
- the URLs from which to load classes and resources
java.lang.SecurityException
- if a security manager exists and its
checkCreateClassLoader
method
does not allow creation of a class loader.SecurityManager.checkCreateClassLoader()
public DVBClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
If there is a security manager, this method first calls the
security manager's checkCreateClassLoader
method to ensure creation of a class loader is allowed.
urls
- the URLs from which to load classes and resourcesparent
- the parent classloader for delegation
java.lang.SecurityException
- if a security manager exists and its
checkCreateClassLoader
method
does not allow creation of a class loader.SecurityManager.checkCreateClassLoader()
Method Detail |
protected java.lang.Class findClass(java.lang.String name) throws java.lang.ClassNotFoundException
name
- the name of the class.
java.lang.ClassNotFoundException
- if the named class could not be
found.public static DVBClassLoader newInstance(java.net.URL[] urls)
loadClass
method of the DVBClassLoader returned by this method will invoke
the SecurityManager.checkPackageAccess
method before
loading the class.
urls
- the URLs to search for classes and resources.
public static DVBClassLoader newInstance(java.net.URL[] urls, java.lang.ClassLoader parent)
loadClass
method of the DVBClassLoader returned by this method will invoke
the SecurityManager.checkPackageAccess
method before
loading the class.
urls
- the URLs to search for classes and resources.parent
- the parent class loader for delegation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |