org.apache.openjpa.lib.util
Class TemporaryClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.apache.openjpa.lib.util.TemporaryClassLoader

public class TemporaryClassLoader
extends ClassLoader

ClassLoader implementation that allows classes to be temporarily loaded and then thrown away. Useful for the enhancer to be able to run against a class without first loading(and thus polluting) the parent ClassLoader.

Author:
Marc Prud'hommeaux

Constructor Summary
TemporaryClassLoader(ClassLoader parent)
           
 
Method Summary
 Class loadClass(String name)
           
protected  Class loadClass(String name, boolean resolve)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, 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

TemporaryClassLoader

public TemporaryClassLoader(ClassLoader parent)
Method Detail

loadClass

public Class loadClass(String name)
                throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

loadClass

protected Class loadClass(String name,
                          boolean resolve)
                   throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.