Re: Classpath Annotation Scanner and autobinding...

270 views
Skip to first unread message

Noctarius

unread,
Aug 25, 2011, 3:35:30 PM8/25/11
to google...@googlegroups.com
Am 25.08.2011 17:32, schrieb em3:
> Hi guys,
>
> Just I want to know if there is some 3rd party extension for Guice to
> autobind classes based on annotations. Something like the classpath
> scanner of Spring, where it enable you to auto discover beans
> annotated with @Resource, @Component, etc.. under some specific
> package.
>
> Cheers!.
> M.
>

I started an classpath scanner some time ago. It's not yet feature
complete but maybe you like to help :)

A class search looks kind of like an SQL query:

https://bitbucket.org/noctarius/cappadocia/src/8d92d9c98f8f/src/test/java/org/sourceprojects/cappadocia/test/QueryTest.java

Stuart McCulloch

unread,
Aug 25, 2011, 4:27:15 PM8/25/11
to google...@googlegroups.com

there's also:

https://github.com/manzke/guice-automatic-injection

we also provide some scanners+autowiring in Sisu that can be re-used:

https://github.com/sonatype/sisu
http://www.eclipse.org/proposals/technology.sisu/

( we're hopefully going to move Sisu to Eclipse soon - until then there's some old doc at http://sisu.sonatype.org/quick-guide.html )

> --
> You received this message because you are subscribed to the Google Groups "google-guice" group.
> To post to this group, send email to google...@googlegroups.com.
> To unsubscribe from this group, send email to google-guice...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
>

Brian Pontarelli

unread,
Aug 25, 2011, 4:30:15 PM8/25/11
to google...@googlegroups.com
On Aug 25, 2011, at 2:27 PM, Stuart McCulloch wrote:

> On 25 Aug 2011, at 20:35, Noctarius wrote:
>
>> Am 25.08.2011 17:32, schrieb em3:
>>> Hi guys,
>>>
>>> Just I want to know if there is some 3rd party extension for Guice to
>>> autobind classes based on annotations. Something like the classpath
>>> scanner of Spring, where it enable you to auto discover beans
>>> annotated with @Resource, @Component, etc.. under some specific
>>> package.
>>>
>>> Cheers!.
>>> M.
>>>
>>
>> I started an classpath scanner some time ago. It's not yet feature
>> complete but maybe you like to help :)
>>
>> A class search looks kind of like an SQL query:
>>
>> https://bitbucket.org/noctarius/cappadocia/src/8d92d9c98f8f/src/test/java/org/sourceprojects/cappadocia/test/QueryTest.java
>
> there's also:
>
> https://github.com/manzke/guice-automatic-injection
>
> we also provide some scanners+autowiring in Sisu that can be re-used:
>
> https://github.com/sonatype/sisu
> http://www.eclipse.org/proposals/technology.sisu/
>
> ( we're hopefully going to move Sisu to Eclipse soon - until then there's some old doc at http://sisu.sonatype.org/quick-guide.html )

I did this in JCatapult as well and moved it to a project that got lost in the recent Java.net move. It uses ASM to speed things up.

-bp

Reply all
Reply to author
Forward
0 new messages