Class OverridingClassLoader

Direct Known Subclasses:
SimpleInstrumentableClassLoader, SimpleThrowawayClassLoader

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 application classes are temporarily loaded in the overriding ClassLoader for introspection purposes before eventually loading an instrumented version of the class in the given parent ClassLoader.
Since:
2.0.1
Author:
Rod Johnson, Juergen Hoeller
  • Field Details

    • DEFAULT_EXCLUDED_PACKAGES

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

    • OverridingClassLoader

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

      public OverridingClassLoader(@Nullable ClassLoader parent, @Nullable ClassLoader overrideDelegate)
      Create a new OverridingClassLoader for the given ClassLoader.
      Parameters:
      parent - the ClassLoader to build an overriding ClassLoader for
      overrideDelegate - the ClassLoader to delegate to for overriding
      Since:
      4.3
  • Method Details