Suppose you have a FooProxy, and a subinterface SubFooProxy (extends 
FooProxy), respectively mapped (@ProxyFor) to, say, Foo and SubFoo (extends 
Foo) domain objects.
You have a method with a return type of Foo/FooProxy but which could return 
a SubFoo/SubFooProxy. If SubFooProxy is never, ever, referenced directly in 
any method on a RequestContext or another proxy, then RF won't even know 
about its existence, so your returned SubFoo will always map to a FooProxy.
@ExtraTypes allows you to reference types that wouldn't be referenced 
otherwise. Putting @ExtraTypes(SubFooProxy.class) anywhere (really, it 
absolutely doesn't matter where you put the annotation) will tell RF about 
SubFooProxy, so a returned SubFoo will be mapped to a SubFooProxy.

-- 
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/-/oNKuGIb7Ci8J.
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.

Reply via email to