IE, Class A is a service Class B @Inject A a
Class C then uses Class B, but in order to access it, Class B must be added to the appmodule via contrib config, and then class C needs Class C @Inject B b Then class D uses Class C, and it goes on and on. Once any class in the chain uses a service, they all then need to be autobuilt in some fashion, and you can't use new anymore. You can't break the chain as it were, and mix constructors with autoinjected private fields. It would be nice if you could go in your appmodule and say something like @Match(A) public static <T> T injectFields() On Wed, Apr 29, 2009 at 12:10 PM, daniel joyce <[email protected]> wrote: > So basically once I start using Injection, every class that uses a > injected class needs to be injected itself. > > It would be nice if this could be improved upon, thus allowing > 'services' and non-page, non-service business objects to play nicely > together. > > -Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
