Guice for Dependency Injection

GuiceI’m not going to go into the merits of DI, at least not in this post but what I wanted to say was that I now started to use it for building the plugin. To get the extension points, witch is configured as class names, to get injected I had to create delegating wrappers that simply forwards all method calls to a instance it fetches from the guice injector. It would be nice to be able to get around this but right now I don’t see how.

It add a bit of complexity but in the end it makes everything so much simpler so I believe it will be worth it. I don’t know how to handle the different component levels in idea, Application, Project, Module. I’m hoping I can solve it with scopes in guice but else I will just have to use separate injectors for each level.

0 Responses to “Guice for Dependency Injection”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.