Thanks Thomas. That's exactly what I needed.
Also, thanks for the constructive criticism. I wasn't aware the factories
are not normally used for value objects, and it did seem to be muddying the
waters a bit.
On Friday, November 30, 2012 3:20:24 AM UTC-8, Thomas Broyer wrote:
>
>
>
> On Friday, November 30, 2012 9:14:03 AM UTC+1, seas wrote:
>>
>> I've got a class, TestPlace, that derives from Place that takes two
>> parameters, both Strings.
>>
>> I use GIN so I have a PlaceFactory to create instances of my places.
>>
>
> Places are value-objects, so it's not clear to me why you need a factory
> (and how it's related to using GIN).
>
>
>> It has a method for creating TestPlace that has two String parameters.
>>
>> It all looks pretty straight forward, except that inside the TestPlace
>> constructor, both strings end up being the first parameter in the call to
>> the factory method!
>>
>> Here's the TestPlace constructor:
>> <pre>
>> @Inject
>> public TestPlace (@Assisted String testId, @Assisted String authType) {
>>
>
> See “Making parameter types distinct” at
> http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/assistedinject/FactoryModuleBuilder.html
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/XONquajCZ7UJ.
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-web-toolkit?hl=en.