org.objectweb.jonas.server
Class JClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.objectweb.jonas.server.JClassLoader

public class JClassLoader
extends java.net.URLClassLoader

This class implements a URLClassLoader, that permits to add some URLs in it.

Author:
Ludovic Bert, Florent Benoit

Constructor Summary
JClassLoader(java.lang.String name, java.net.URL[] urls)
          Constructs a new ClassLoader with the specified URLs.
JClassLoader(java.lang.String name, java.net.URL[] urls, java.lang.ClassLoader parent)
          Constructs a new ClassLoader with the specified URLs.
 
Method Summary
 void addURL(java.net.URL url)
          Add the specified URL to this ClassLoader.
 void addURLs(java.net.URL[] urls)
          Add the specified URLs to this ClassLoader.
 java.lang.String getClassPath()
          Get the class path of this classloader
 void printURLs()
          Display all the URLs from the class loader
 java.lang.String toString()
          Displays useful information
 
Methods inherited from class java.net.URLClassLoader
definePackage, findClass, findResource, findResources, 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, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, 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

JClassLoader

public JClassLoader(java.lang.String name,
                    java.net.URL[] urls,
                    java.lang.ClassLoader parent)
Constructs a new ClassLoader with the specified URLs.

Parameters:
name - ClassLoader name (used for Display)
urls - the URLs to add at the ClassLoader creation.
parent - parent ClassLoader, null if no parent.

JClassLoader

public JClassLoader(java.lang.String name,
                    java.net.URL[] urls)
Constructs a new ClassLoader with the specified URLs. Uses the default delegation parent classloader.

Parameters:
name - ClassLoader name (used for Display)
urls - the URLs to add at the ClassLoader creation.
Method Detail

addURL

public void addURL(java.net.URL url)
Add the specified URL to this ClassLoader.

Overrides:
addURL in class java.net.URLClassLoader
Parameters:
url - the URL to add to this ClassLoader.

addURLs

public void addURLs(java.net.URL[] urls)
Add the specified URLs to this ClassLoader.

Parameters:
urls - the URLs to add to this ClassLoader.

printURLs

public void printURLs()
Display all the URLs from the class loader


getClassPath

public java.lang.String getClassPath()
Get the class path of this classloader

Returns:
the class path of this classloader

toString

public java.lang.String toString()
Displays useful information

Overrides:
toString in class java.lang.Object
Returns:
information