You need to generate implementation for abstract classes yourself. Probably the easiest to have a custom module with a method that registers the abstract class and adds the binding with the on-the-fly implementation.
Something like the http://code.google.com/p/google-guice/source/browse/extensions/persist/src/com/google/inject/persist/jpa/JpaPersistModule.java#109 But you need something with more punch than j.l.r.Proxy. Cheers Alen On Mar 1, 2:03 am, flukus <[email protected]> wrote: > I'm trying to create proxies for an abstract class that implement > aspects/traits by adding and interface to the class. The interceptor > would then intercept the interface methods and redirect them to a > concrete class. The binding however doesn't seem to work with abstract > classes eg: > > bindInterceptor(Matchers.only(Home.class), Matchers.any(), new > DrawableInterceptor()); > > If Home is abstract then I get the error: > > "No implementation for Home was bound. > while locating Home" > > It works fine if Home is not abstract though. My expectation was that > guice would generate a concrete class with all the required methods > implemented but that seems to not be the case. Any ideas? -- 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.
