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.apache.axis2.classloader
Class MultiParentClassLoader

    java.lang.Object
      java.lang.ClassLoader
          java.security.SecureClassLoader
              java.net.URLClassLoader
                  org.apache.axis2.classloader.MultiParentClassLoader

Direct Known Subclasses:
  JarFileClassLoader

    public class MultiParentClassLoader

extends URLClassLoader

A MultiParentClassLoader is a simple extension of the URLClassLoader that simply changes the single parent class loader model to support a list of parent class loaders. Each operation that accesses a parent, has been replaced with a operation that checks each parent in order. This getParent method of this class will always return null, which may be interpreted by the calling code to mean that this class loader is a direct child of the system class loader.

Version:
  $Rev$ $Date$

Constructor Summary
`MultiParentClassLoader(MultiParentClassLoader source)`
`MultiParentClassLoader(URL[] urls)` Creates a named class loader with no parents.
`MultiParentClassLoader(URL[] urls, ClassLoader parent)` Creates a named class loader as a child of the specified parent.
`MultiParentClassLoader(URL[] urls, ClassLoader[] parents)` Creates a named class loader as a child of the specified parents.
`MultiParentClassLoader(URL[] urls, ClassLoader[] parents, boolean inverseClassLoading, Collection hiddenClasses, Collection nonOverridableClasses)`
`MultiParentClassLoader(URL[] urls, ClassLoader[] parents, boolean inverseClassLoading, String[] hiddenClasses, String[] nonOverridableClasses)`
`MultiParentClassLoader(URL[] urls, ClassLoader[] parents, URLStreamHandlerFactory factory)` Creates a named class loader as a child of the specified parents and using the specified URLStreamHandlerFactory for accessing the urls..
`MultiParentClassLoader(URL[] urls, ClassLoader parent, boolean inverseClassLoading, String[] hiddenClasses, String[] nonOverridableClasses)`
`MultiParentClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)` Creates a named class loader as a child of the specified parent and using the specified URLStreamHandlerFactory for accessing the urls..

Method Summary
`void` | `addURL(URL url)`
`void` | `destroy()`
`Enumeration` | `findResources(String name)`
`ClassLoader[]` | `getParents()` Gets the parents of this class loader.
`URL` | `getResource(String name)`
`boolean` | `isDestroyed()`
`protected Class` | `loadClass(String name, boolean resolve)`
`String` | `toString()`

Methods inherited from class java.net.URLClassLoader
`definePackage, findClass, findResource, getPermissions, getURLs, newInstance, newInstance`

Methods inherited from class java.security.SecureClassLoader
`defineClass, defineClass`

Methods inherited from class java.lang.ClassLoader
`clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

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

Constructor Detail

### MultiParentClassLoader

    public MultiParentClassLoader(URL[] urls)

  Creates a named class loader with no parents.

  Parameters:
    `urls` - the urls from which this class loader will classes and resources

### MultiParentClassLoader

    public MultiParentClassLoader(URL[] urls,
                                  ClassLoader parent)

  Creates a named class loader as a child of the specified parent.

  Parameters:
    `urls` - the urls from which this class loader will classes and resources
    `parent` - the parent of this class loader

### MultiParentClassLoader

    public MultiParentClassLoader(URL[] urls,
                                  ClassLoader parent,
                                  boolean inverseClassLoading,
                                  String[] hiddenClasses,
                                  String[] nonOverridableClasses)

### MultiParentClassLoader

    public MultiParentClassLoader(URL[] urls,
                                  ClassLoader parent,
                                  URLStreamHandlerFactory factory)

  Creates a named class loader as a child of the specified parent and using the specified URLStreamHandlerFactory for accessing the urls..

  Parameters:
    `urls` - the urls from which this class loader will classes and resources
    `parent` - the parent of this class loader
    `factory` - the URLStreamHandlerFactory used to access the urls

### MultiParentClassLoader

    public MultiParentClassLoader(URL[] urls,
                                  ClassLoader[] parents)

  Creates a named class loader as a child of the specified parents.

  Parameters:
    `urls` - the urls from which this class loader will classes and resources
    `parents` - the parents of this class loader

### MultiParentClassLoader

    public MultiParentClassLoader(URL[] urls,
                                  ClassLoader[] parents,
                                  boolean inverseClassLoading,
                                  Collection hiddenClasses,
                                  Collection nonOverridableClasses)

### MultiParentClassLoader

    public MultiParentClassLoader(URL[] urls,
                                  ClassLoader[] parents,
                                  boolean inverseClassLoading,
                                  String[] hiddenClasses,
                                  String[] nonOverridableClasses)

### MultiParentClassLoader

    public MultiParentClassLoader(MultiParentClassLoader source)

### MultiParentClassLoader

    public MultiParentClassLoader(URL[] urls,
                                  ClassLoader[] parents,
                                  URLStreamHandlerFactory factory)

  Creates a named class loader as a child of the specified parents and using the specified URLStreamHandlerFactory for accessing the urls..

  Parameters:
    `urls` - the urls from which this class loader will classes and resources
    `parents` - the parents of this class loader
    `factory` - the URLStreamHandlerFactory used to access the urls

Method Detail

### getParents

    public ClassLoader[] getParents()

  Gets the parents of this class loader.

  Returns:
    the parents of this class loader

### addURL

    public void addURL(URL url)

  Overrides:
    `addURL` in class `URLClassLoader`

### loadClass

    protected Class loadClass(String name,
                              boolean resolve)
                       throws ClassNotFoundException

  Overrides:
    `loadClass` in class `ClassLoader`
  Throws:
    `ClassNotFoundException`

### getResource

    public URL getResource(String name)

  Overrides:
    `getResource` in class `ClassLoader`

### findResources

    public Enumeration findResources(String name)
                              throws IOException

  Overrides:
    `findResources` in class `URLClassLoader`
  Throws:
    `IOException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### isDestroyed

    public boolean isDestroyed()

### destroy

    public void destroy()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.