Re: Guice Emacs Hacks

2009-09-01 Thread Brian Pontarelli
I've always wondered if any of those can really hang with something like IDEA. I'd love to see a full fledge speed coding competition at next year's JavaOne (if it happens). Person who can code a project fastest and perform simple refactorings wins. Starts with freshly booted machines with

Re: how to solve this - different instances of same interface

2009-09-01 Thread cpea
This is how I ended up solving the problem: public CalculatorModule { @BindingAnnotation @Target({ FIELD, PARAMETER, METHOD }) @Retention (RUNTIME) public @interface TypeA {} @BindingAnnotation @Target({ FIELD, PARAMETER, METHOD }) @Retention (RUNTIME) public @interface TypeB {}

Re: how to solve this - different instances of same interface

2009-09-01 Thread cpea
I don't see how this could have been done without the CalculatorFactory part. The User (and their group) is dynamic information at runtime. The "caller" doesn't know what type of calculator it needs. Am I missing something here? --~--~-~--~~~---~--~~ You received t

Re: Knowing the stage in a module

2009-09-01 Thread jordi
you can inject Stage in your classes too: @Inject public Foo(Stage stage) { this.stage = stage } On Tue, Sep 1, 2009 at 1:06 AM, Max Bowsher wrote: > Pablo Fernandez wrote: > > Hi, > > > > I'd like to know the stage (PRODUCTION, DEVELOPMENT) that my injector > > is in. > > > > I basically want