Class AntClassLoader

java.lang.Object
java.lang.ClassLoader
org.apache.tools.ant.AntClassLoader
All Implemented Interfaces:
Closeable, AutoCloseable, EventListener, BuildListener, SubBuildListener
Direct Known Subclasses:
AntClassLoader2, AntClassLoader5, SplitClassLoader

public class AntClassLoader extends ClassLoader implements SubBuildListener, Closeable
Used to load classes within ant with a different classpath from that used to start ant. Note that it is possible to force a class into this loader even when that class is on the system classpath by using the forceLoadClass method. Any subsequent classes loaded by that class will then use this loader rather than the system class loader.

Note that this classloader has a feature to allow loading in reverse order and for "isolation". Due to the fact that a number of methods in java.lang.ClassLoader are final (at least in java 1.4 getResources) this means that the class has to fake the given parent.