The one catch with autofactory+Guice is that the things the generated factories create won't be able to participate in AOP (since they're explicitly new'd instead of created by Guice). So it's a little like the first iteration of assistedinject. OTOH, it's using generated code, which is nice in its own way. So it's a trade-off of which support you need: AOP and/or listeners, or simpler code debugging.
sam On Mon, Oct 21, 2013 at 3:59 PM, Cédric Beust ♔ <[email protected]> wrote: > > On Mon, Oct 21, 2013 at 12:18 PM, Gregory Kick <[email protected]> wrote: > >> As it turns out, when you're generating code, assisted injection doesn't >> even need to be part of Dagger (or Guice for that matter). > > > Yeah, was thinking about this. The reason why assisted injection exists at > all is because Java doesn't support default parameters. If you are able to > generate the factory that will instantiate this class, nothing stops the > generator from creating a factory with these fields already initialized > with the correct dependencies. > > Curious to see what Guice/Dagger will look like with code generation, keep > us posted! > > -- > Cédric > > > -- > Cédric > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-guice. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. For more options, visit https://groups.google.com/groups/opt_out.
