frjaeger220 / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Expose UniqueAnnotations.create() #266

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Daniel Martin is interested in using this.

Original issue reported on code.google.com by limpbizkit on 28 Oct 2008 at 10:50

GoogleCodeExporter commented 9 years ago
Where is this now?  This is 4 years old.  Is it still desirable?  Can Dan 
Martin or someone describe a desired usage?

Original comment by cgruber@google.com on 27 Aug 2012 at 6:26

GoogleCodeExporter commented 9 years ago
Right now I'm re-implementing UniqueAnnotations for my own "extension".  
Basically I have an AbstractMagicModule with a magic() method that indicates 
that some magic should be performed.  magic() simply does

    bind(Key.get(InternalType.class, MyUniqueAnnotations.create())).toInstance(...)

and elsewhere the SPI is used to detect these bindings and actually perform the 
magic.

Original comment by tavianator@gmail.com on 9 Oct 2013 at 1:11