-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b14e1c8
commit 2d69e9e
Showing
11 changed files
with
49 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
dikt-annotations/src/commonMain/kotlin/dev/shustoff/dikt/InjectByConstructors.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package dev.shustoff.dikt | ||
|
||
import kotlin.reflect.KClass | ||
|
||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FILE, AnnotationTarget.FUNCTION) | ||
@Retention(AnnotationRetention.SOURCE) | ||
/** | ||
* Tells compiler that dependencies of listed types should be created by constructor when needed. | ||
* | ||
* Primary constructor is called for creating dependencies of listed types. | ||
* Di functions inside module will return the new instances for listed types on each call. | ||
*/ | ||
annotation class InjectByConstructors( | ||
vararg val types: KClass<*> | ||
) |
15 changes: 15 additions & 0 deletions
15
dikt-annotations/src/commonMain/kotlin/dev/shustoff/dikt/InjectSingleByConstructors.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package dev.shustoff.dikt | ||
|
||
import kotlin.reflect.KClass | ||
|
||
@Target(AnnotationTarget.CLASS) | ||
@Retention(AnnotationRetention.SOURCE) | ||
/** | ||
* Tells compiler to create a lazy properties initialized with constructor calls for listed types and use that property in di functions. | ||
* | ||
* Primary constructor is called for creating dependencies of listed types. | ||
* Di functions inside module will return the same instances for listed types. | ||
*/ | ||
annotation class InjectSingleByConstructors( | ||
vararg val types: KClass<*> | ||
) |
14 changes: 0 additions & 14 deletions
14
dikt-annotations/src/commonMain/kotlin/dev/shustoff/dikt/ModuleSingletons.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters