I don't think anything relating to dependencies or injection points is going to solve your problem. Ultimately what you need is for the requirement in LineNumbersCache to be relaxed, so that code Guice is injecting doesn't require having line numbers available.
FWIW, you can take a look at the patch at http://code.google.com/p/google-guice/issues/detail?id=366 . That exposes some new API methods around InjectiongPoint/Dependency. i doubt it will resolve your problem -- but if it does, it's another point in favor of the API changes. sam On Tue, Nov 30, 2010 at 12:02 PM, Simone Tripodi <[email protected]>wrote: > Hi all guys, > after tried creating classes with ASM that require dependency > injection by Guice, without success, due to Issue 574[1], I' d like to > know if is there a way to simulate injection points for components > defined at runtime. > > I started taking a look to > `com.google.inject.spi.ProviderWithDependencies` that requires > `Set<com.google.inject.spi.Dependency<?>> getDependencies()` method be > implemented, and the Set can be obtained by invoking > > `com.google.inject.spi.Dependency.forInjectionPoints(Set<com.google.inject.spi.InjectionPoint> > injectionPoints)`. > > My trouble is that `com.google.inject.spi.InjectionPoint` instances > can be build only via `com.google.inject.spi.InjectionPoint` static > methods, that look for Guice's annotations. Moreover > `com.google.inject.spi.InjectionPoint` is final so I can't extend it > to cheat Guice invoking my custom methods. That's the point I'm > blocked :P > > Any thought/suggestion? Many thanks in advance! > Simo > > [1] http://code.google.com/p/google-guice/issues/detail?id=574 > > http://people.apache.org/~simonetripodi/ > http://www.99soft.org/ > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-guice%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
