The Composite class loader also has registered the classloader that loaded xstream.jar and (if available) the thread's context classloader.
CompositeClassLoader loader = new CompositeClassLoader(); loader.add(MyClass.class.getClassLoader()); loader.add(new AnotherClassLoader()); loader.loadClass("com.blah.ChickenPlucker");
The above code will attempt to load a class from the following classloaders (in order):
The added classloaders are kept with weak references to allow an application container to reload classes.
@author Joe Walnes @author Jörg Schaible @since 1.0.3
|
|
|
|