ref

inline fun <T : Any> ref(name: String? = null): T

Get a reference to the bean by type or type + name with the syntax ref<Foo>() or ref<Foo>("foo"). When leveraging Kotlin type inference it could be as short as ref() or ref("foo").

Parameters

name

the name of the bean to retrieve

T

type the bean must match, can be an interface or superclass