Hi all,
I am really sorry for writing to this mailing list, but I checked all user forums and
chats and saw that they are very old.
I would be very thankful if someone gives suggestion for solving the following problem.
I have a child and parent class. Child has SimpleFoo, Parent needs Advaced foo. So,
@Dependent
public class SimpleFoo {
}
@Dependent
public class AdvancedFoo extends SimpleFoo {
}
@Dependent
public class Child {
private SimpleFoo foo;
@Inject
protected void setFoo(SimpleFoo foo) {
this.foo = foo;
}
}
@Dependent
public class Parent extends Child {
@Inject
@Override
protected void setFoo(SimpleFoo foo) { //How to inject here AdvancedFoo?
super.setFoo(foo);
}
}
How to inject in Parent AdvancedFoo? I know that I can do it via constructor injection
but I need method injection. How to do it? Can it be done without using names (like
MyBean1)
but only using classes (AdvancedFoo)?
Best regards, Alex
--
Alex Sviridov