gh-pages / com.nextfaze.devfun.inject
Package com.nextfaze.devfun.inject
Types
| Name | Summary |
|---|---|
| AndroidInstanceProvider | interface AndroidInstanceProvider : AndroidInstanceProviderInternal |
| CacheLevel | enum class CacheLevelControls how aggressively the CompositeInstanceProvider caches the sources of class instances. |
| CapturingInstanceProvider | class CapturingInstanceProvider<out T : Any> : InstanceProviderAn instance provider that requests an instance of a class from a captured lambda. |
| CompositeInstanceProvider | interface CompositeInstanceProvider : ThrowingInstanceProvider, Composite<InstanceProvider>Instance provider that delegates to other providers. |
| ConstructingInstanceProvider | class ConstructingInstanceProvider : InstanceProviderProvides objects via instance construction. Type must be annotated with Constructable. |
| InstanceProvider | interface InstanceProviderProvides object instances for one or more types. |
| KObjectInstanceProvider | class KObjectInstanceProvider : InstanceProviderHandles Kotlin object and companion object types. |
| ThrowingInstanceProvider | interface ThrowingInstanceProvider : InstanceProviderSame as InstanceProvider, but throws ClassInstanceNotFoundException instead of returning null. |
Annotations
| Name | Summary |
|---|---|
| Constructable | annotation class ConstructableTag to allow classes to be instantiated when no other InstanceProvider was able to provide the class. |
Exceptions
| Name | Summary |
|---|---|
| ClassInstanceNotFoundException | class ClassInstanceNotFoundException : ExceptionException thrown when attempting to provide a type that was not found from any InstanceProvider. |
| ConstructableException | class ConstructableException : ExceptionThrown when ConstructingInstanceProvider fails to create a new instance of a class. |
Extensions for External Classes
| Name | Summary |
|---|---|
| kotlin.reflect.KClass |
Functions
| Name | Summary |
|---|---|
| captureInstance | fun <T : Any> captureInstance(instance: () -> T?): InstanceProviderUtility function to capture an instance of an object. |
| createDefaultCompositeInstanceProvider | fun createDefaultCompositeInstanceProvider(cacheLevel: CacheLevel = CacheLevel.AGGRESSIVE): CompositeInstanceProviderCreates an instance provider that delegates to other providers. |
| singletonInstance | fun <T : Any> singletonInstance(instance: () -> T?): InstanceProviderUtility function to provide a single instance of some type. |