Capsule

open class Capsule<T : Any, in A>(creator: (A) -> T, onCreate: (T) -> Unit = { if (it is Engine<*>) it.master.registerEngine(it) })

Singleton Holder

Constructors

Link copied to clipboard
fun <T : Any, in A> Capsule(creator: (A) -> T, onCreate: (T) -> Unit = { if (it is Engine<*>) it.master.registerEngine(it) })

Functions

Link copied to clipboard
fun get(arg: A): T

Properties

Link copied to clipboard
var creator: (A) -> T?