public abstract class DVBClassLoader extends SecureClassLoader
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 and Description |
---|
DVBClassLoader(URL[] urls)
Constructs a new DVBClassLoader for the given URLs.
|
DVBClassLoader(URL[] urls,
ClassLoader parent)
Constructs a new DVBClassLoader for the given URLs.
|
Modifier and Type | Method and Description |
---|---|
Class |
findClass(String name)
Finds and loads the class with the specified name from the URL
search path.
|
static DVBClassLoader |
newInstance(URL[] urls)
Creates a new instance of DVBClassLoader for the specified URLs.
|
static DVBClassLoader |
newInstance(URL[] urls,
ClassLoader parent)
Creates a new instance of DVBClassLoader for the specified URLs.
|
defineClass, getPermissions
clearAssertionStatus, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public DVBClassLoader(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 resourcesSecurityException
- if a security manager exists and its
checkCreateClassLoader
method
doesn't allow creation of a class loader.SecurityManager.checkCreateClassLoader()
public DVBClassLoader(URL[] urls, 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 delegationSecurityException
- if a security manager exists and its
checkCreateClassLoader
method
doesn't allow creation of a class loader.SecurityManager.checkCreateClassLoader()
public Class findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
name
- the name of the class.ClassNotFoundException
- if the named class could not be
found.public static DVBClassLoader newInstance(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(URL[] urls, 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.Copyright © 2012 CableLabs. All Rights Reserved.