With Spring it’s possible to add BeanPostProcessor implementations to the context in order to conditionally replace, wrap or proxy beans before and after they’ve been initialized with their dependencies.
Does Google Guice offer something similar?
Example: I have a SomethingHandler interface with a single execute method and based on some conditions I want to decorate / wrap implementations with LoggingHandler, AuthenticationHandler and so on.
You should use an InjectionListener
http://google-guice.googlecode.com/git/javadoc/com/google/inject/spi/InjectionListener.html
more on the subject:
http://code.google.com/p/google-guice/issues/detail?id=62