Config

interface Config

A configuration holds information about how to configure specific rules.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Is thrown when loading a configuration results in errors.

Properties

Link copied to clipboard
abstract val parent: Config?

The reference to a parent Config from this configuration, useful when navigating with subConfig. It's null if this is the top most configuration object.

Link copied to clipboard
abstract val parentPath: String?

Keeps track of which key was taken to subConfig this configuration. Sub-sequential calls to subConfig are tracked with '>' as a separator.

Functions

Link copied to clipboard
abstract fun subConfig(key: String): Config

Tries to retrieve part of the configuration based on given key.

Link copied to clipboard
abstract fun subConfigKeys(): Set<String>

Returns a set of all sub configuration keys.

Link copied to clipboard
open fun <T : Any> valueOrDefault(key: String, default: T): T

Retrieves a sub configuration or value based on given key. If configuration property cannot be found the specified default value is returned.

Link copied to clipboard
abstract fun <T : Any> valueOrNull(key: String): T?

Retrieves a sub configuration or value based on given key. If the configuration property cannot be found, null is returned.