Package-level declarations¶
Types¶
Name | Summary |
---|---|
KAbstractModule | [jvm] abstract class KAbstractModule : AbstractModule A class that provides helper methods for working with Kotlin and Guice, allowing implementing classes to operate in the Kotlin type system rather than converting to Java. |
KInstallOnceModule | [jvm] abstract class KInstallOnceModule : KAbstractModule Make it safe to install multiple instances of this module. Guice will only install it once. |
Functions¶
Name | Summary |
---|---|
asSingleton | [jvm] fun ScopedBindingBuilder.asSingleton() |
getInstance | [jvm] inline fun <T : Any> Injector.getInstance(annotation: Annotation? = null): T |
getSetOf | [jvm] fun <T : Any> Injector.getSetOf(type: KClass<T>, annotation: KClass<out Annotation>? = null): Set<T> |
keyOf | [jvm] inline fun <T : Any> keyOf(): Key<T> inline fun <T : Any> keyOf(a: Annotation): Key<T> [jvm] inline fun <T : Any> keyOf(a: KClass<out Annotation>?): Key<T> If annotation is not null, returns a key for @Annotation T, otherwise a key for T. |
listOfType | [jvm] inline fun <T : Any> listOfType(): TypeLiteral<List<T>> fun <T> listOfType(elementType: TypeLiteral<T>): TypeLiteral<List<T>> fun <T : Any> listOfType(elementType: KClass<T>): TypeLiteral<List<T>> |
mapOfType | [jvm] inline fun <K : Any, V : Any> mapOfType(): TypeLiteral<Map<K, V>> fun <K, V> mapOfType(keyType: TypeLiteral<K>, valueType: TypeLiteral<V>): TypeLiteral<Map<K, V>> fun <K : Any, V : Any> mapOfType(keyType: KClass<K>, valueType: KClass<V>): TypeLiteral<Map<K, V>> |
parameterizedType | [jvm] inline fun <T : Any> parameterizedType(vararg typeParameters: Type): ParameterizedType |
setOfType | [jvm] inline fun <T : Any> setOfType(): TypeLiteral<Set<T>> fun <T> setOfType(elementType: TypeLiteral<T>): TypeLiteral<Set<T>> fun <T : Any> setOfType(elementType: KClass<T>): TypeLiteral<Set<T>> |
subtypeOf | [jvm] inline fun <T : Any> subtypeOf(): WildcardType |
toKey | [jvm] fun <T : Any> TypeLiteral<T>.toKey(annotation: KClass<out Annotation>? = null): Key<T> fun <T : Any> KClass<T>.toKey(qualifier: KClass<out Annotation>? = null): Key<T> |
typeLiteral | [jvm] fun Type.typeLiteral(): TypeLiteral<> fun <T : Any> KClass<T>.typeLiteral(): TypeLiteral<T> fun KType.typeLiteral(): TypeLiteral<> |
uninject | [jvm] fun uninject(target: Any) |