de.smartics.util.lang.classpath
Class ProjectClassLoader

Package class diagram package ProjectClassLoader
java.lang.Object
  extended by java.lang.ClassLoader
      extended by de.smartics.util.lang.classpath.AbstractProjectClassLoader
          extended by de.smartics.util.lang.classpath.ProjectClassLoader

public class ProjectClassLoader
     
     
extends AbstractProjectClassLoader

A class loader that serves classes from the given directories.


Constructor Summary
ProjectClassLoader(ClassLoader parent, Collection<String> rootDirectoryNames)
          Convenience constructor to specify the directories as Strings.
ProjectClassLoader(ClassLoader parent, List<File> rootDirectories)
          Default constructor.
ProjectClassLoader(Collection<String> rootDirectoryNames)
          Convenience constructor to specify the directories as Strings and using the Thread.currentThread()#getContextClassLoader().
ProjectClassLoader(List<File> rootDirectories)
          Convenience constructor using the Thread.currentThread()#getContextClassLoader().
 
Method Summary
protected  Class<?> findClass(String name)
           
protected  URL findResource(String name)
           
protected  Enumeration<URL> findResources(String name)
           
 
Methods inherited from class de.smartics.util.lang.classpath.AbstractProjectClassLoader
ensurePackageProvided, loadClassFile, loadClassFromLibrary, loadResourceFromLibrary
 
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, toString, wait, wait, wait
 

Constructor Detail

ProjectClassLoader

public ProjectClassLoader(List<File> rootDirectories)
Convenience constructor using the Thread.currentThread()#getContextClassLoader().

Parameters:
rootDirectories - the list of root directories to search for classes.

ProjectClassLoader

public ProjectClassLoader(Collection<String> rootDirectoryNames)
Convenience constructor to specify the directories as Strings and using the Thread.currentThread()#getContextClassLoader().

Parameters:
rootDirectoryNames - the list of root directory names to search for classes.

ProjectClassLoader

public ProjectClassLoader(ClassLoader parent,
                          Collection<String> rootDirectoryNames)
Convenience constructor to specify the directories as Strings.

Parameters:
parent - the parent class loader.
rootDirectoryNames - the list of root directory names to search for classes.

ProjectClassLoader

public ProjectClassLoader(ClassLoader parent,
                          List<File> rootDirectories)
Default constructor.

Parameters:
parent - the parent class loader.
rootDirectories - the list of root directories to search for classes.
Method Detail

findResource

protected URL findResource(String name)
Overrides:
findResource in class ClassLoader

findResources

protected Enumeration<URL> findResources(String name)
Overrides:
findResources in class ClassLoader

findClass

protected Class<?> findClass(String name)
                      throws ClassNotFoundException
Overrides:
findClass in class ClassLoader
Throws:
ClassNotFoundException


Copyright © 2011-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.