Example usage for org.springframework.core OverridingClassLoader OverridingClassLoader

List of usage examples for org.springframework.core OverridingClassLoader OverridingClassLoader

Introduction

In this page you can find the example usage for org.springframework.core OverridingClassLoader OverridingClassLoader.

Prototype

public OverridingClassLoader(@Nullable ClassLoader parent, @Nullable ClassLoader overrideDelegate) 

Source Link

Document

Create a new OverridingClassLoader for the given ClassLoader.

Usage

From source file:org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver.java

@Override
public ClassLoader getThrowawayClassLoader() {
    if (this.getThrowawayClassLoaderMethod != null) {
        ClassLoader target = (ClassLoader) ReflectionUtils.invokeMethod(this.getThrowawayClassLoaderMethod,
                this.classLoader);
        return (target instanceof DecoratingClassLoader ? target
                : new OverridingClassLoader(this.classLoader, target));
    } else {//from   w  w  w . j a v a 2 s  .co m
        return new SimpleThrowawayClassLoader(this.classLoader);
    }
}