Re: Bind an abstract class with its implementation using Guice.

2014-02-05 Thread Stuart McCulloch
On 5 Feb 2014, at 21:10, Rama Krishna Gollapudi wrote: > This is not working. I'm getting the same exception(DomainResource is > abstract, not a concrete class. Unable to create AssistedInject factory). Unfortunately I don't see that exception using the snippets of code you pasted below, the

Re: Bind an abstract class with its implementation using Guice.

2014-02-05 Thread Rama Krishna Gollapudi
This is not working. I'm getting the same exception(DomainResource is abstract, not a concrete class. Unable to create AssistedInject factory). On Wednesday, 5 February 2014 14:52:22 UTC-6, scl wrote: > > According to the documentation: > > constructedType is a concrete class with an @Inject-an

Re: Bind an abstract class with its implementation using Guice.

2014-02-05 Thread Sam Berlin
Yes, this is one of the use-cases that assistedinject supports, and there's a lot of tests to make sure it's working as expected. Since you're experiencing a problem with it, the best way to find out what's causing that problem is to isolate it into a reproducible test-case. sam On Wed, Feb 5,

Re: Bind an abstract class with its implementation using Guice.

2014-02-05 Thread Rama Krishna Gollapudi
I'm not sure. But here is my problem precisely. I'm using an abstract class inside the factory and bindind that implementation. Example: public interface ResourceFactory { Resource domainResource(Domain target); } public abstract class Resource{} public MyResource extends Resource{}. Whe

Re: Bind an abstract class with its implementation using Guice.

2014-02-05 Thread Stephan Classen
According to the documentation: constructedType is a concrete class with an @Inject-annotated constructor. In addition to injector-supplied parameters, the constructor should have parameters that match each of the factory method's parameters. Each factory-supplied pa

Re: Bind an abstract class with its implementation using Guice.

2014-02-05 Thread Sam Berlin
Can you isolate the problem into a repeatable self-contained test-case? sam On Tue, Feb 4, 2014 at 1:39 PM, Rama Krishna Gollapudi wrote: > Here is my abstract class > > public abstract class DomainResource { > > @Inject > @Assisted > private Domain target; > > @Inject > pr

Re: Bind an abstract class with its implementation using Guice.

2014-02-05 Thread Rama Krishna Gollapudi
Hello is there any solution to my problem ? On Tuesday, 4 February 2014 12:39:29 UTC-6, Rama Krishna Gollapudi wrote: > > Here is my abstract class > > public abstract class DomainResource { > > @Inject > @Assisted > private Domain target; > > @Inject > private LinkHelper helpe

Re: IntelliJ difficulties with guava classes

2014-02-05 Thread Michael Burton
I tried re-importing from maven and invalidating the caches. Neither worked, but I was able to fix it by going into the Modules configuration and removing the broken "guava (1)", "guava (2)" and "guava (4)" modules. Not sure how they got in there, but everything works now. Thanks for the assist

Re: IntelliJ difficulties with guava classes

2014-02-05 Thread Brian Pontarelli
Did you try "Invalidate Caches"? -- Brian On Feb 5, 2014, at 11:22 AM, Michael Burton wrote: > Is there a recommended way to build guice from within IntelliJ? It works > fine using maven, but when I try to edit or build code from IntellIJ 13 I see > a number of errors due to unresolved depe

Re: IntelliJ difficulties with guava classes

2014-02-05 Thread David Hoffer
I'd summit this issue to JetBrainssee what they say. -Dave On Wed, Feb 5, 2014 at 11:26 AM, Sam Berlin wrote: > In Eclipse, I just put in the source & jars. Not sure what IntelliJ would > be doing ... maybe it's trying to build a layout off the POMs and is > confused since the current POM

Re: IntelliJ difficulties with guava classes

2014-02-05 Thread Sam Berlin
In Eclipse, I just put in the source & jars. Not sure what IntelliJ would be doing ... maybe it's trying to build a layout off the POMs and is confused since the current POM setup shades the dependencies? sam On Wed, Feb 5, 2014 at 1:22 PM, Michael Burton wrote: > Is there a recommended way

IntelliJ difficulties with guava classes

2014-02-05 Thread Michael Burton
Is there a recommended way to build guice from within IntelliJ? It works fine using maven, but when I try to edit or build code from IntellIJ 13 I see a number of errors due to unresolved dependencies in things like the Guava library. I assume this is because of the way the build is using jar