FilteredClassLoader

Test URLClassLoader that can filter the classes and resources it can load.

Author

Andy Wilkinson

Stephane Nicoll

Phillip Webb

Roy Jacobs

Since

2.0.0

Constructors

Link copied to clipboard
constructor(hiddenClasses: Array<Class<out Any>>)
Create a FilteredClassLoader that hides the given classes.
constructor(parent: ClassLoader, hiddenClasses: Array<Class<out Any>>)
Create a FilteredClassLoader with the given parent that hides the given classes.
constructor(hiddenPackages: Array<String>)
Create a FilteredClassLoader that hides classes from the given packages.
constructor(hiddenResources: Array<ClassPathResource>)
Create a FilteredClassLoader that hides resources from the given classpath resources.
constructor(filters: Array<Predicate<String>>)
Create a FilteredClassLoader that filters based on the given predicate.

Types

Link copied to clipboard
Filter to restrict the classes that can be loaded.
Link copied to clipboard
Filter to restrict the resources that can be loaded.
Link copied to clipboard
Filter to restrict the packages that can be loaded.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun close()
Link copied to clipboard
open fun findResource(name: String): URL
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getResource(name: String): URL
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getSystemResource(name: String): URL
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getURLs(): Array<URL>
Link copied to clipboard
open fun isClassReloadable(clazz: Class<out Any>): Boolean
Link copied to clipboard
open fun loadClass(name: String): Class<out Any>
Link copied to clipboard
open fun newInstance(urls: Array<URL>, parent: ClassLoader): URLClassLoader
Link copied to clipboard
open fun publicDefineClass(name: String, b: Array<Byte>, protectionDomain: ProtectionDomain): Class<out Any>
Link copied to clipboard
open fun resources(name: String): Stream<URL>
Link copied to clipboard
open fun setClassAssertionStatus(className: String, enabled: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun setPackageAssertionStatus(packageName: String, enabled: Boolean)