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(java.net.URL[] urls)` Creates a JarFileClassLoader that is a child of the system class loader.
`JarFileClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)` Creates a JarFileClassLoader that is a child of the specified class loader.
`JarFileClassLoader(java.net.URL[] urls, java.lang.ClassLoader[] parents)` Creates a named class loader as a child of the specified parents.
`JarFileClassLoader(java.net.URL[] urls, java.lang.ClassLoader[] parents, boolean inverseClassLoading, java.util.Collection hiddenClasses, java.util.Collection nonOverridableClasses)`
`JarFileClassLoader(java.net.URL[] urls, java.lang.ClassLoader[] parents, boolean inverseClassLoading, java.lang.String[] hiddenClasses, java.lang.String[] nonOverridableClasses)`
`JarFileClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent, boolean inverseClassLoading, java.lang.String[] hiddenClasses, java.lang.String[] nonOverridableClasses)`

Method Summary
`void` | `addURL(java.net.URL url)`
`protected void` | `addURLs(java.net.URL[] urls)` Adds an array of urls to the end of this class loader.
`static java.lang.ClassLoader` | `copy(java.lang.ClassLoader source)`
`void` | `destroy()`
`protected java.lang.Class` | `findClass(java.lang.String className)`
`protected java.lang.String` | `findLibrary(java.lang.String libraryName)`
`java.net.URL` | `findResource(java.lang.String resourceName)`
`java.net.URL[]` | `getURLs()`
`protected java.util.Enumeration<java.net.URL>` | `internalfindResources(java.lang.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(java.net.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(java.net.URL[] urls,
                              java.lang.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(java.net.URL[] urls,
                              java.lang.ClassLoader parent,
                              boolean inverseClassLoading,
                              java.lang.String[] hiddenClasses,
                              java.lang.String[] nonOverridableClasses)

### JarFileClassLoader

    public JarFileClassLoader(java.net.URL[] urls,
                              java.lang.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(java.net.URL[] urls,
                              java.lang.ClassLoader[] parents,
                              boolean inverseClassLoading,
                              java.util.Collection hiddenClasses,
                              java.util.Collection nonOverridableClasses)

### JarFileClassLoader

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

### JarFileClassLoader

    public JarFileClassLoader(JarFileClassLoader source)

Method Detail

### copy

    public static java.lang.ClassLoader copy(java.lang.ClassLoader source)

### getURLs

    public java.net.URL[] getURLs()

  Overrides:
    `getURLs` in class `java.net.URLClassLoader`

### addURL

    public void addURL(java.net.URL url)

  Overrides:
    `addURL` in class `MultiParentClassLoader`

### addURLs

    protected void addURLs(java.net.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 java.net.URL findResource(java.lang.String resourceName)

  Overrides:
    `findResource` in class `java.net.URLClassLoader`

### internalfindResources

    protected java.util.Enumeration<java.net.URL> internalfindResources(java.lang.String name)
                                                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### findLibrary

    protected java.lang.String findLibrary(java.lang.String libraryName)

  Overrides:
    `findLibrary` in class `java.lang.ClassLoader`

### findClass

    protected java.lang.Class findClass(java.lang.String className)
                                 throws java.lang.ClassNotFoundException

  Overrides:
    `findClass` in class `java.net.URLClassLoader`
  Throws:
    `java.lang.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.