groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: java parser usage in Groovy
Date Wed, 24 Jun 2015 10:47:05 GMT
Am 24.06.2015 10:32, schrieb Guillaume Laforge:
> Annotation processors can modify classes and such, and indeed, this
> couldn't work for Groovy classes.
> But in the case of Dagger 2, it's just generating new classes, and not
> modifying those that are annotated.
> So Dagger 2 is happy with this as it doesn't have to change Groovy's
> classes at all.
> So the stubs are enough for Dagger 2.


yes, but if you have something like

class Foo {
  @Inject Bar bar
}

doesn't dagger need to add code to the class Foo to inject the Bar 
implementation? I mean I thought I have seen that you use the class 
simply by `new Foo()`, or did I misread? For that to work and have DI, 
you need to modify Foo, or not?

bye blackdrag

-- 
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/


Mime
View raw message