org.springframework.core

Class OverridingClassLoader


  • public class OverridingClassLoader
    extends DecoratingClassLoader
    ClassLoader that does not always delegate to the parent loader, as normal class loaders do. This enables, for example, instrumentation to be forced in the overriding ClassLoader, or a "throwaway" class loading behavior, where selected classes are temporarily loaded in the overriding ClassLoader, in order to load an instrumented version of the class in the parent ClassLoader later on.
    Since:
    2.0.1
    Author:
    Rod Johnson, Juergen Hoeller
    • Field Detail

      • DEFAULT_EXCLUDED_PACKAGES

        public static final String[] DEFAULT_EXCLUDED_PACKAGES
        Packages that are excluded by default
    • Constructor Detail

      • OverridingClassLoader

        public OverridingClassLoader(ClassLoader parent)
        Create a new OverridingClassLoader for the given class loader.
        Parameters:
        parent - the ClassLoader to build an overriding ClassLoader for