Community
Participate
Working Groups
Build Identifier: I20120315-1300 Assuming we have a class Bar extending super class Foo: Wouldn’t it be nice for the ContextInjectionFactory to be able to handle situations where: a) Bar and Foo both contain a method annotated with the qualifier annotation b) Bar or Foo have multiple methods annotated with the qualifier annotation c) Bar and Foo have multiple methods annotated with the qualifier annotation Currently, only the “first” method will be called. This makes sense, if one is interested in the return value of the called method. But in a lot of cases the called methods will be void (i.e. life cycle invocations). I think it would be nice to have something like: public void invokeAll(Object object, Class<? extends Annotation> qualifier, IEclipseContext context) in ContextInjectionFactory (possibly with a return of Object[]). I am interested because I am currently building an abstract LifeCycleManager which will be extended by multiple Applications and I am thinking about my implementation approach. It would be nice to be able to extend an abstract class where both classes could respond to the life cycle invocations. Reproducible: Always Steps to Reproduce: 1. Create class with multiple methods annotated with a qualifier 2. Use ContextInjectionFactory.invoke on an object of the class using the qualifier 3. Only the first annotated method found will be called
Created attachment 216644 [details] proposed implementation
Created attachment 216645 [details] usage in E4 life cycle manager