org.sadun.util
Class AutoClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byorg.sadun.util.AutoClassLoader

public class AutoClassLoader
extends java.lang.ClassLoader

A ClassLoader implementation which looks up the JARs in classpath and loads them individually, without the need of specifying one by one. The JARs are loaded in the same order they appear in the directory listing.

Version:
1.0.1
Author:
Cristiano Sadun

Constructor Summary
AutoClassLoader()
          Creates new AutoClassLoader
AutoClassLoader(java.lang.ClassLoader parent)
          Creates new AutoClassLoader
 
Method Summary
protected  java.lang.Class findClass(java.lang.String name)
          Finds a class in the expanded class path
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, 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, toString, wait, wait, wait
 

Constructor Detail

AutoClassLoader

public AutoClassLoader()
Creates new AutoClassLoader


AutoClassLoader

public AutoClassLoader(java.lang.ClassLoader parent)
Creates new AutoClassLoader

Method Detail

findClass

protected java.lang.Class findClass(java.lang.String name)
                             throws java.lang.ClassNotFoundException
Finds a class in the expanded class path

Throws:
java.lang.ClassNotFoundException - if the class cannot be found

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception