Currently class can be annotated with DependencyAnnotation but it don't have to be, to be scanned. This is a bit awkward. The only declarations which should be annotatable by DependencyAnnotation should be value or function declarations. Containers should be automatically included into injection process when needed. So Depin in its costurctor should fetch this container declarations. TargetAnnotation should only be applicable on constructors and is support annotation for selecting which constructor should be used for instantiation. This should include instantiations of dependencies and not only Depin.inject parameters. There is no difference between dependency and target both definitions can be used in different context interchangeable.
Currently class can be annotated with
DependencyAnnotation
but it don't have to be, to be scanned. This is a bit awkward. The only declarations which should be annotatable byDependencyAnnotation
should be value or function declarations. Containers should be automatically included into injection process when needed. SoDepin
in its costurctor should fetch this container declarations.TargetAnnotation
should only be applicable on constructors and is support annotation for selecting which constructor should be used for instantiation. This should include instantiations of dependencies and not onlyDepin.inject
parameters. There is no difference between dependency and target both definitions can be used in different context interchangeable.