spring-framework / org.springframework.instrument.classloading / ResourceOverridingShadowingClassLoader

ResourceOverridingShadowingClassLoader

open class ResourceOverridingShadowingClassLoader : ShadowingClassLoader

Subclass of ShadowingClassLoader that overrides attempts to locate certain files.

Author
Rod Johnson

Author
Adrian Colyer

Since
2.0

Constructors

<init>

ResourceOverridingShadowingClassLoader(enclosingClassLoader: ClassLoader)

Create a new ResourceOverridingShadowingClassLoader, decorating the given ClassLoader.

Inherited Properties

DEFAULT_EXCLUDED_PACKAGES

static val DEFAULT_EXCLUDED_PACKAGES: Array<String>

Packages that are excluded by default

Functions

copyOverrides

open fun copyOverrides(other: ResourceOverridingShadowingClassLoader): Unit

Copy all overrides from the given ClassLoader.

getResource

open fun getResource(requestedPath: String): URL

getResourceAsStream

open fun getResourceAsStream(requestedPath: String): InputStream

getResources

open fun getResources(requestedPath: String): Enumeration<URL>

override

open fun override(oldPath: String, newPath: String): Unit

Return the resource (if any) at the new path on an attempt to locate a resource at the old path.

suppress

open fun suppress(oldPath: String): Unit

Ensure that a resource with the given path is not found.

Inherited Functions

addTransformer

open fun addTransformer(transformer: ClassFileTransformer): Unit

Add the given ClassFileTransformer to the list of transformers that this ClassLoader will apply.

copyTransformers

open fun copyTransformers(other: ShadowingClassLoader): Unit

Copy all ClassFileTransformers from the given ClassLoader to the list of transformers that this ClassLoader will apply.

loadClass

open fun loadClass(name: String): Class<*>