Not uncommon. I don't actually like the solution I proposed, but it can clean up some boilerplate in some cases - possibly not yours, sadly.

c.

On 21 Aug 2013, at 9:15, [email protected] wrote:

Indeed, thank for the idea.
The problem is that my project is some kind of framework, and I would like to say to developers that they only have to implements *IInitableAfterCreation *on their objects for the framework to automatically calls init() on them! Otherwise I would have to explain them that they have to extend it from
theirs interfaces.


On Wednesday, August 21, 2013 10:21:01 AM UTC-4, Christian Gruber wrote:

As a side note, if you don't have a required inheritance hierarchy in
your context, you can make an AbstractInitableWidget which has a
default, overridable init() and implements IInitableAfterCreation, just
to cut down on boilerplate.  It would be good if Matching on the
subclassesOf bit works though, as the above is sort of janky.

c.



--
You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency Injection
email: [email protected] :::: mobile: +1 (646) 807-9839

--
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to