Hi David, have you ever had a look at http://99soft.github.com/lifegycle/after-injection.html ?
HTH, -Simo http://people.apache.org/~simonetripodi/ http://simonetripodi.livejournal.com/ http://twitter.com/simonetripodi http://www.99soft.org/ On Mon, Feb 27, 2012 at 10:53 AM, David Nouls <[email protected]> wrote: > Hi, > > I'm looking for a feature in Guice (and GIN) that allows me to call a method > after injection has been done on an object. > I found a blogpost that gives me a solution, but is really a cludge for > something that should be somehow part of Guice. > http://cristianvrabie.blogspot.com/2009/11/simulate-bean-initialization-in-gwt.html > > What I need is some kind of way to mark a method that needs to be invoked > when construction, member and setter injections have been performed. > > I don't want to add some maybeInitialize method and call that from > everywhere in the object since that will bring in multithreading issues. > > I can not/do not want to use constructor injection because in my case I have > a baseclass that need injections but I don't want to polute the derived > classes to also have to call super( ... ). This would basically expose the > internals of the root class. > > David > > > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-guice/-/zbX_giSnsnQJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
