IMO, it should be possible to set the "returnType" on each method of the 
interface, so you could have an async method returning 'void', another one 
returning 'Request' and yet another returning 'RequestBuilder', all in one 
interface. Same could be useful for the callback type too (and actually 
probably all the options you provide).
I had long thought about using RemoteServiceRelativePath to trigger an 
annotation processor, but I would have to come up with some annotation to 
define the return type. In the end, it's probably easier to generate the 
sync interface from the async one: all you have to do is to decide whether 
you want the boxed or primitive types when your callback takes a boxed type 
as type-argument (e.g. AsyncCallback<Integer>), but it wouldn't be a real 
issue in practice I believe to always pick the type-argument as-is and 
never convert to the primitive type.

On Monday, September 14, 2015 at 2:50:02 PM UTC+2, Cristiano wrote:
>
> Hello all,
>
> we are using an annotation processor to generate the async interfaces that 
> are required by the GWT RPC services. This annotation processor automatizes 
> the generation and works smoothly both with the maven build and on the IDE, 
> plus we have other generation requirements and we have then added some more 
> options to customize the output. Code generation is triggered by adding the 
> @Asynchronize annotation to the original interface.
>
> We *have released it open source*, on 
> https://github.com/codejuicer/asynchronize and the first public release 
> is already available and published into Maven Central repo:
> <dependency>
>     <groupId>org.codejuicer</groupId>
>     <artifactId>asynchronize-processor</artifactId>
>     <version>0.9.1</version>
> </dependency>
>
> Here is a Youtube video overview <https://youtu.be/YC853Kkm_6E> I have 
> made to show how to use the processor and what it does (but generically it 
> is sufficient to add this dependency and put @Asynchronize to make it 
> work). 
>
> We would like it to be used for future GWT, so we ask please the main 
> contributors to have a look and give feedback, report issues (on github!) 
> or ask documentation clarification so we can improve it for GWT developers 
> needs.
>
> Thank you all,
>
> Cristiano
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/93b9c04c-b2ab-4b81-90b4-f698f2768d41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to