Class TemporaryClassLoader


  • public class TemporaryClassLoader
    extends java.lang.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

      Constructors 
      Constructor Description
      TemporaryClassLoader​(java.lang.ClassLoader parent)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class loadClass​(java.lang.String name)  
      protected java.lang.Class loadClass​(java.lang.String name, boolean resolve)  
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, registerAsParallelCapable, resolveClass, resources, 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​(java.lang.ClassLoader parent)
    • Method Detail

      • loadClass

        public java.lang.Class loadClass​(java.lang.String name)
                                  throws java.lang.ClassNotFoundException
        Overrides:
        loadClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • loadClass

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