PrefixResourceLoaderPreprocessor

class PrefixResourceLoaderPreprocessor @JvmOverloads constructor(val prefix: String, val resourceLoader: ResourceLoader = ResourceLoader.SYSTEM) : TraversingPrimitivePreprocessor

Preprocessor for a config node. If the node is a StringNode and the value starts with the prefix, then the node value is treated as a resource location. This is loaded using the resourceLoader and returned as a StringNode.

prefix is one of ClasspathResourceLoaderBackend.SCHEME, EnvironmentResourceLoaderBackend.SCHEME or FilesystemLoaderBackend.SCHEME

Constructors

Link copied to clipboard
constructor(prefix: String, resourceLoader: ResourceLoader = ResourceLoader.SYSTEM)

Properties

Link copied to clipboard
Link copied to clipboard
val resourceLoader: ResourceLoader

Functions

Link copied to clipboard
open override fun handle(node: PrimitiveNode, context: DecoderContext): ConfigResult<Node>
Link copied to clipboard
open override fun process(node: Node, context: DecoderContext): ConfigResult<Node>