Are you asking how to combine polymorphism with injection via @In? Or something else?
Sorry for the confusing question.
My questsions are:
- Is this correct, that the field annotated with @In needs to have the same name as the entity is annoted with @Name?
- And yes how is polymorphism done over @In
Sorry again and thanks for your answer!
@In can inject any context variable.
You can bind any object to any context variable using @Out or Context.set().
So no, the three components do not have to have the same name.
Or you can turn the implementation inside out and use a @Factory method, which decides what object to return.