Package com.uchuhimo.konf.source

Types

BaseSource
Link copied to clipboard
open class BaseSource(info: SourceInfo, tree: TreeNode, features: Map<Feature, Boolean>) : Source
DefaultLoaders
Link copied to clipboard
class DefaultLoaders(config: Config, transform: (Source) -> Source?)
Default loaders for config.
DefaultMapProviders
Link copied to clipboard
object DefaultMapProviders
Providers for map of variant formats.
DefaultProviders
Link copied to clipboard
object DefaultProviders
Default providers.
InvalidRemoteRepoException
Link copied to clipboard
class InvalidRemoteRepoException(repo: String, dir: String) : SourceException
Exception indicates that the given repository is not in the remote list of the local repository.
InvalidWatchKeyException
Link copied to clipboard
class InvalidWatchKeyException(source: Source) : SourceException
Exception indicates that watch key is no longer valid for the source.
ListSourceNode
Link copied to clipboard
open class ListSourceNode(list: List<TreeNode>, isPlaceHolder: Boolean) : ListNode, MapNode
Loader
Link copied to clipboard
class Loader(config: Config, provider: Provider)
Loader to load source from various input formats.
LoadException
Link copied to clipboard
class LoadException(path: Path, cause: Throwable) : SourceException
Exception indicates failure to load specified path.
MapLoader
Link copied to clipboard
class MapLoader(config: Config, transform: (Source) -> Source?)
Loader to load source from map of variant formats.
MergedSource
Link copied to clipboard
class MergedSource(facade: Source, fallback: Source) : Source
NoSuchPathException
Link copied to clipboard
class NoSuchPathException(source: Source, path: Path) : SourceException
Exception indicates that expected value in specified path is not existed in the source.
NullSourceNode
Link copied to clipboard
object NullSourceNode : NullNode
ObjectMappingException
Link copied to clipboard
class ObjectMappingException(source: String, clazz: Class<*>, cause: Throwable) : SourceException
Exception indicates failure to map source to value of specified class.
ParseException
Link copied to clipboard
class ParseException : SourceException
Exception indicates that there is a parsing error.
PromoteFunc
Link copied to clipboard
typealias PromoteFunc<Out> = (Any, Source) -> Out
Provider
Link copied to clipboard
interface Provider
Provides source from various input format.
RegisterExtension
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class RegisterExtension(value: Array<String>)
Source
Link copied to clipboard
interface Source
Source to provide values for config.
SourceException
Link copied to clipboard
open class SourceException : ConfigException
Exception for source.
SourceInfo
Link copied to clipboard
class SourceInfo(info: MutableMap<String, String>) : MutableMap<String, String>
Information of source for debugging.
SourceNotFoundException
Link copied to clipboard
class SourceNotFoundException(message: String) : SourceException
Exception indicates that specified source is not found.
SubstitutableNode
Link copied to clipboard
interface SubstitutableNode : ValueNode
TreeLookup
Link copied to clipboard
class TreeLookup(root: TreeNode, source: Source, errorWhenUndefined: Boolean) : StringLookup
UndefinedPathVariableException
Link copied to clipboard
class UndefinedPathVariableException(source: Source, text: String) : SourceException
Exception indicates that undefined paths occur during variable substitution.
UnknownPathsException
Link copied to clipboard
class UnknownPathsException(source: Source, paths: List<String>) : SourceException
Exception indicates that the source contains unknown paths.
UnsupportedExtensionException
Link copied to clipboard
class UnsupportedExtensionException(source: String) : SourceException
Exception indicates that specified source has unsupported extension.
UnsupportedMapKeyException
Link copied to clipboard
class UnsupportedMapKeyException(clazz: Class<*>) : SourceException
Exception indicates that value of specified class is unsupported as key of map.
UnsupportedNodeTypeException
Link copied to clipboard
class UnsupportedNodeTypeException(source: Source, node: TreeNode) : SourceException
Exception indicates that the specified node has unsupported type.
UnsupportedTypeException
Link copied to clipboard
class UnsupportedTypeException(source: Source, clazz: Class<*>) : SourceException
Exception indicates that value of specified class in unsupported in the source.
ValueSourceNode
Link copied to clipboard
class ValueSourceNode(value: Any, substituted: Boolean, originalValue: Any?) : SubstitutableNode
Writer
Link copied to clipboard
interface Writer
Save config to various output format.
WrongTypeException
Link copied to clipboard
class WrongTypeException(source: String, actual: String, expected: String) : SourceException
Exception indicates that actual type of value in source is unmatched with expected type.

Functions

asSource
Link copied to clipboard
fun Any.asSource(type: String = "", info: SourceInfo = SourceInfo()): Source
asTree
Link copied to clipboard
fun Any.asTree(): TreeNode
asValue
Link copied to clipboard
inline fun <T> Source.asValue(): T
asValueOf
Link copied to clipboard
fun TreeNode.asValueOf(source: Source, type: Class<*>): Any
toDuration
Link copied to clipboard
fun String.toDuration(): Duration
Parses specified string to duration.
toValue
Link copied to clipboard
inline fun <T> Source.toValue(): T
Returns a value casted from source.