DVBClassLoader

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.dvb.lang
Class DVBClassLoader

    java.lang.Object
      java.lang.ClassLoader
          java.security.SecureClassLoader
              org.dvb.lang.DVBClassLoader

    public abstract class DVBClassLoader

extends SecureClassLoader

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(URL[] urls)` Constructs a new DVBClassLoader for the given URLs.
`DVBClassLoader(URL[] urls, ClassLoader parent)` Constructs a new DVBClassLoader for the given URLs.

Method Summary
`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.

Methods inherited from class java.lang.ClassLoader
`clearAssertionStatus, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DVBClassLoader

    public DVBClassLoader(URL[] urls)

  Constructs a new DVBClassLoader for the given URLs. The URLs will be searched in the order specified for classes and resources.

  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.

  Parameters:
    `urls` - the URLs from which to load classes and resources
  Throws:
    `SecurityException` - if a security manager exists and its `checkCreateClassLoader` method does not allow creation of a class loader.
  See Also:
    `SecurityManager.checkCreateClassLoader()`

### DVBClassLoader

    public DVBClassLoader(URL[] urls,
                          ClassLoader parent)

  Constructs a new DVBClassLoader for the given URLs. The URLs will be searched in the order specified for classes and resources.

  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.

  Parameters:
    `urls` - the URLs from which to load classes and resources
    `parent` - the parent classloader for delegation
  Throws:
    `SecurityException` - if a security manager exists and its `checkCreateClassLoader` method does not allow creation of a class loader.
  See Also:
    `SecurityManager.checkCreateClassLoader()`

Method Detail

### newInstance

    public static DVBClassLoader newInstance(URL[] urls)

  Creates a new instance of DVBClassLoader for the specified URLs. If a security manager is installed, the `loadClass` method of the DVBClassLoader returned by this method will invoke the `SecurityManager.checkPackageAccess` method before loading the class.

  Parameters:
    `urls` - the URLs to search for classes and resources.
  Returns:
    the resulting class loader

### newInstance

    public static DVBClassLoader newInstance(URL[] urls,
                                             ClassLoader parent)

  Creates a new instance of DVBClassLoader for the specified URLs. If a security manager is installed, the `loadClass` method of the DVBClassLoader returned by this method will invoke the `SecurityManager.checkPackageAccess` method before loading the class.

  Parameters:
    `urls` - the URLs to search for classes and resources.
    `parent` - the parent class loader for delegation.
  Returns:
    the resulting class loader

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD