Id
izumi.distage.model.definition.Id
Annotation for summoning named instances.
Example:
val module = new ModuleDef {
make[Int].named("three").from(3)
make[Int].named("five").from(5)
}
Injector().produce(module).run {
(five: Int @Id("five"), three: Int @Id("three")) =>
assert(5 == five)
assert(3 == three)
}
Attributes
- Note:
javax.inject.Named
annotation is also supported- Graph
- Supertypes
- trait DIStageAnnotationtrait TypeConstrainttrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass Any