Class WebappClassLoader

All Implemented Interfaces:
Closeable, AutoCloseable, Lifecycle, WebappProperties, InstrumentableClassLoader

public class WebappClassLoader extends WebappClassLoaderBase
Standard web application class loader. Not parallel capable.
  • Constructor Details

    • WebappClassLoader

      public WebappClassLoader()
      Constructs a new WebappClassLoader.
    • WebappClassLoader

      public WebappClassLoader(ClassLoader parent)
      Constructs a new WebappClassLoader with the specified parent class loader.
      Parameters:
      parent - The parent class loader
  • Method Details

    • copyWithoutTransformers

      public WebappClassLoader copyWithoutTransformers()
      Description copied from interface: InstrumentableClassLoader
      Returns a copy of this class loader without any class file transformers. This is a tool often used by Java Persistence API providers to inspect entity classes in the absence of any instrumentation, something that can't be guaranteed within the context of a ClassFileTransformer's transform method.

      The returned class loader's resource cache will have been cleared so that classes already instrumented will not be retained or returned.

      Returns:
      the transformer-free copy of this class loader.
    • getClassLoadingLock

      protected Object getClassLoadingLock(String className)
      This class loader is not parallel capable so lock on the class loader rather than a per-class lock.
      Overrides:
      getClassLoadingLock in class ClassLoader