ClasspathResourceLoader

class ClasspathResourceLoader(clazz: KClass<*>? = null) : ResourceLoader

Simple ResourceLoader that resolves resources from the filesystem.

Resource paths are treated as absolute if they start with '/'. Otherwise, they are resolved relative to commonTest/commonMain resources and (if provided) the class' package path.

Constructors

Link copied to clipboard
constructor(clazz: KClass<*>? = null)

Functions

Link copied to clipboard
open override fun <T> findClass(cname: String, expectedType: KClass<*>): KClass<*>

Finds class of the name and expected type

Link copied to clipboard
open fun <T> newInstance(cname: String, expectedType: KClass<*>): T

Creates an instance of the name and expected type

Link copied to clipboard
open override fun openResource(resource: String): InputStream

Opens a named resource