The assisted inject
docs<http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/assistedinject/FactoryModuleBuilder.html>describe
how to do this. The example in the doc reads:
install(new FactoryModuleBuilder()
.implement(Payment.class, RealPayment.class)
.build(PaymentFactory.class));
You'd just substitute Payment for DomainResource, RealPayment for
TodoResource, and PaymentFactory for your assistedinject factory.
sam
On Tue, Feb 4, 2014 at 12:38 PM, Rama Krishna Gollapudi
<[email protected]>wrote:
> Hello,
> I'm having a problem of binding an abstract class with it's
> implementation using Guice . I'm getting the following exception.
>
> com.rama.util.jaxrs.DomainResource is abstract, not a concrete class.
> Unable to create AssistedInject factory.
>
> And i did binding like this.
> bind(DomainResource.class).to(TodoResource.class);
>
> DomainResoruce is an abstract class and TodoResource is an implementation.
>
> Thanks,
> Rama.
>
> --
> 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.