<HTML><BODY>Hi all,<br><br>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.<br><br>I would be very thankful if someone gives suggestion for solving the following problem. <br>I have a child and parent class. Child has SimpleFoo, Parent needs Advaced foo. So,<br><br>@Dependent<br>public class SimpleFoo {<br>}<br><br>@Dependent<br>public class AdvancedFoo extends SimpleFoo {<br>}<br><br>@Dependent<br>public class Child {<br><br> private SimpleFoo foo;<br><br> @Inject<br> protected void setFoo(SimpleFoo foo) {<br> this.foo = foo;<br> }<br>}<br><br>@Dependent<br>public class Parent extends Child {<br><br> @Inject<br> @Override<br> protected void setFoo(SimpleFoo foo) { //How to inject here AdvancedFoo?<br> super.setFoo(foo);<br> }<br>}<br><br>How to inject in Parent AdvancedFoo? I know that I can do it via constructor injection <br>but I need method injection. How to do it? Can it be done without using names (like MyBean1)<br> but only using classes (AdvancedFoo)?<br><br>Best regards, Alex<br><br><br><br><br><br>-- <br>Alex Sviridov</BODY></HTML>