Open GoogleCodeExporter opened 8 years ago
important issue
Original comment by kudlaty....@gmail.com
on 12 Apr 2010 at 11:40
This is a pretty complicated issue and comes up in all kinds of places. Ideally
we
want all generated classes to be available to Gin (and the underlying Guice) at
compile time. The main block here is that the generated classes never got
compiled to
bytecode but live only in the GWT-internal AST.
To get around the block and use the generated classes just like regular
classes, I'd
propose using a custom classloader or to change Guice to be able to employ
mechanisms
other than reflection to inspect classes. Both are possible but quite
complicated.
AFAIK GWT already uses a special classloader to do similar things for dev mode
so
maybe we can go from there.
Original comment by aragos
on 12 Apr 2010 at 9:20
Thanks for your answer, when I have some time I'll look into the custom
classloader
approach and see if I can come up with something.
Original comment by philippe.beaudoin
on 12 Apr 2010 at 9:27
See discussion at http://groups.google.com/group/google-gin/t/7dd7382be803e00b
Original comment by t.broyer
on 21 Nov 2010 at 9:08
I used a different work-around.
1. in your interface for you generated class create an inner class with static
injected member providers.
2. use requestStaticInjection(YourClass.YourInnerClass.class); in your module
2. in your generated class, create an instance of the inner class and call some
init function with your class ref as a parameter
3. in the init function of your inner class, set the class members
I preferred this method because I didn't have to modify my Ginjector for each
class which wants @Inject members
Original comment by gamma...@gmail.com
on 19 Oct 2012 at 12:32
Hi guys. Thanks for great DI Engine for gwt.
I've reviewed the discussion threads and codereview issues (links from thread)
related to this concrete issue. A long time (the year and the half) there was
no actions around this issues, so I'm just wondering if there are any plans for
it?
Huge work was done for Private Modules and architecture itself and that's was a
very complex thing. Hope now involving generated classes into the DI context
will be easier to implement.
Cheers and best regards.
Original comment by Nikolaz...@gmail.com
on 24 Oct 2012 at 6:57
Thanks for your interest! While this remains one of the largest feature
requests for Gin no one so far has made large inroads into it and knowing my
own schedule for next few months I will not be working on it either.
Original comment by aragos
on 27 Oct 2012 at 6:44
I wrote a project called GinJitsu which allows you to add generators to your
GIN context
http://gammagec.dlinkddns.com/node/25
Original comment by gamma...@gmail.com
on 29 Oct 2012 at 11:06
Original issue reported on code.google.com by
philippe.beaudoin
on 26 Mar 2010 at 6:34