Class SplitClassLoader

  extended by java.lang.ClassLoader
      extended by
          extended by
All Implemented Interfaces:
java.util.EventListener, BuildListener, SubBuildListener

public final class SplitClassLoader
extends AntClassLoader

Specialized classloader for tasks that need finer grained control over which classes are to be loaded via Ant's classloader and which should not even if they are available.

Constructor Summary
SplitClassLoader(java.lang.ClassLoader parent, Path path, Project project, java.lang.String[] splitClasses)
Method Summary
protected  java.lang.Class loadClass(java.lang.String classname, boolean resolve)
          Loads a class with this class loader.
Methods inherited from class
addJavaLibraries, addLoaderPackageRoot, addPathComponent, addPathElement, addPathFile, addSystemPackageRoot, buildFinished, buildStarted, cleanup, defineClassFromData, definePackage, definePackage, findClass, findResources, findResources, forceLoadClass, forceLoadSystemClass, getClasspath, getConfiguredParent, getNamedResources, getResource, getResourceAsStream, getResourceURL, initializeClass, isInPath, log, messageLogged, newAntClassLoader, resetThreadContextLoader, setClassPath, setIsolated, setParent, setParentFirst, setProject, setThreadContextLoader, subBuildFinished, subBuildStarted, targetFinished, targetStarted, taskFinished, taskStarted, toString
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findSystemClass, getPackage, getPackages, getParent, 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


public SplitClassLoader(java.lang.ClassLoader parent,
                        Path path,
                        Project project,
                        java.lang.String[] splitClasses)
splitClasses - classes contained herin will not be loaded via Ant's classloader
Method Detail


protected java.lang.Class loadClass(java.lang.String classname,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException
Description copied from class: AntClassLoader
Loads a class with this class loader. This class attempts to load the class in an order determined by whether or not the class matches the system/loader package lists, with the loader package list taking priority. If the classloader is in isolated mode, failure to load the class in this loader will result in a ClassNotFoundException.

loadClass in class AntClassLoader
classname - The name of the class to be loaded. Must not be null.
resolve - true if all classes upon which this class depends are to be loaded.
the required Class object
java.lang.ClassNotFoundException - if the requested class does not exist on the system classpath (when not in isolated mode) or this loader's classpath.