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 JarFileClassLoader

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

    public class JarFileClassLoader

extends MultiParentClassLoader

The JarFileClassLoader that loads classes and resources from a list of JarFiles. This method is simmilar to URLClassLoader except it properly closes JarFiles when the classloader is destroyed so that the file read lock will be released, and the jar file can be modified and deleted.

Version:
  $Rev: 725315 $ $Date: 2008-12-10 21:15:38 +0530 (Wed, 10 Dec 2008) $

Constructor Summary
`JarFileClassLoader(JarFileClassLoader source)`
`JarFileClassLoader(URL[] urls)` Creates a JarFileClassLoader that is a child of the system class loader.
`JarFileClassLoader(URL[] urls, ClassLoader parent)` Creates a JarFileClassLoader that is a child of the specified class loader.
`JarFileClassLoader(URL[] urls, ClassLoader[] parents)` Creates a named class loader as a child of the specified parents.
`JarFileClassLoader(URL[] urls, ClassLoader[] parents, boolean inverseClassLoading, Collection hiddenClasses, Collection nonOverridableClasses)`
`JarFileClassLoader(URL[] urls, ClassLoader[] parents, boolean inverseClassLoading, String[] hiddenClasses, String[] nonOverridableClasses)`
`JarFileClassLoader(URL[] urls, ClassLoader parent, boolean inverseClassLoading, String[] hiddenClasses, String[] nonOverridableClasses)`

Method Summary
`void` | `addURL(URL url)`
`protected void` | `addURLs(URL[] urls)` Adds an array of urls to the end of this class loader.
`static ClassLoader` | `copy(ClassLoader source)`
`void` | `destroy()`
`protected Class` | `findClass(String className)`
`protected String` | `findLibrary(String libraryName)`
`URL` | `findResource(String resourceName)`
`URL[]` | `getURLs()`
`protected Enumeration<URL>` | `internalfindResources(String name)`

Methods inherited from class org.apache.axis2.classloader.MultiParentClassLoader
`findResources, getParents, getResource, isDestroyed, loadClass, toString`

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

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

Methods inherited from class java.lang.ClassLoader
`clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, 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

### JarFileClassLoader

    public JarFileClassLoader(URL[] urls)

  Creates a JarFileClassLoader that is a child of the system class loader.

  Parameters:
    `urls` - a list of URLs from which classes and resources should be loaded

### JarFileClassLoader

    public JarFileClassLoader(URL[] urls,
                              ClassLoader parent)

  Creates a JarFileClassLoader that is a child of the specified class loader.

  Parameters:
    `urls` - a list of URLs from which classes and resources should be loaded
    `parent` - the parent of this class loader

### JarFileClassLoader

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

### JarFileClassLoader

    public JarFileClassLoader(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

### JarFileClassLoader

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

### JarFileClassLoader

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

### JarFileClassLoader

    public JarFileClassLoader(JarFileClassLoader source)

Method Detail

### copy

    public static ClassLoader copy(ClassLoader source)

### getURLs

    public URL[] getURLs()

  Overrides:
    `getURLs` in class `URLClassLoader`

### addURL

    public void addURL(URL url)

  Overrides:
    `addURL` in class `MultiParentClassLoader`

### addURLs

    protected void addURLs(URL[] urls)

  Adds an array of urls to the end of this class loader.

  Parameters:
    `urls` - the URLs to add

### destroy

    public void destroy()

  Overrides:
    `destroy` in class `MultiParentClassLoader`

### findResource

    public URL findResource(String resourceName)

  Overrides:
    `findResource` in class `URLClassLoader`

### internalfindResources

    protected Enumeration<URL> internalfindResources(String name)
                                              throws IOException

  Throws:
    `IOException`

### findLibrary

    protected String findLibrary(String libraryName)

  Overrides:
    `findLibrary` in class `ClassLoader`

### findClass

    protected Class findClass(String className)
                       throws ClassNotFoundException

  Overrides:
    `findClass` in class `URLClassLoader`
  Throws:
    `ClassNotFoundException`

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.