Skip to content

kite-core / jp.co.cyberagent.kite.core / KiteContext

KiteContext

interface KiteContext

Persistent context for the KiteDslScope. It behaves like a map.

Properties

Name Summary
keys abstract val keys:Set<Any>
Returns all keys in this context.

Functions

Name Summary
get abstract operator fun <T :Any> get(key:Any):T?
Returns the value with the given key. If the key is not found then returns null.
plus open operator fun plus(kiteContext:KiteContext):KiteContext
Returns a context containing value from this context and values from other kiteContext. The elements from this context with the same key as in the other one are dropped.

Extension Functions

Name Summary
asKiteContextElement fun <T :Any>T.asKiteContextElement():Pair<KClass<*>,Any>
Creates a KiteContextElement with the KClass
getByType fun <T :Any>KiteContext.getByType():T?
Returns the value with its KClass as the key. If the key is not found then returns null.
require fun <T :Any>KiteContext.require(key:Any):T
Returns the value with the given key. If the key is not found then throws IllegalArgumentException.
requireByType fun <T :Any>KiteContext.requireByType():T
Returns the value with its KClass as the key. If the key is not found then throws IllegalArgumentException.

Inheritors

Name Summary
MutableKiteContext interface MutableKiteContext :KiteContext
A modifiable KiteContext.