Package-level declarations

Types

Link copied to clipboard
annotation class Alias(val value: String)

Annotation to use a specific implementation (defined in any injectable class) in a constructor/method parameter

Link copied to clipboard
annotation class Assisted

Annotation to be used in any constructor parameter that is not injectable and will be provided in runtime (Can only be used in a class with BY_NEW scope).

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Exclude

This annotation applies ONLY for interfaces and abstract classes. It annotates the desired interfaces that don't want to add as injectable. Needs to be BINARY to be detected between modules when compiling

Link copied to clipboard

Annotation to define the environments that an @Injectable class can be injected to or to define the constructors to be used when injecting an @Injectable class or to define the method to be used when injecting an @InjectableProvider class

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Injectable(val scope: Scope = Scope.BY_APP, val alias: String = "", val propagation: Propagation = Propagation.ALL, val exclude: KClass<*> = arrayOf())

Annotation to define that a class can be injected. By default, this annotation adds also as an injectable object all its interfaces (Propagation.ALL) unless otherwise specified Also, if not defined, takes the scope BY_APP by default If you want to exclude some of them, do it through parameter 'exclude'

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class InjectableProvider(val scope: Scope = Scope.BY_APP, val alias: String = "", val propagation: Propagation = Propagation.NONE, val exclude: KClass<*> = arrayOf())

Annotation to define a class that provides an injectable class This is normally used with external classes, where you don't have the source code to add @Injectable annotation By default, only the provided class is injectable (Propagation.NONE) Also, if not defined, takes the scope BY_APP by default

Link copied to clipboard
annotation class WithEnvironment(val value: String)

Annotation to use a specific environment as an implementation of a constructor/method parameter