Kevin,
It depends one the which generator can know which interface.
If the generators can know both interfaces, you can create only one
generator. All code generator is pushed to sub classes like
IntrerfaceAWriter and InterfaceBWriter. The generator looks for
several interfaces from the marker interface and call the
corresponding writers.
If one generator (generatorB) can know the other interface (intefaceA)
but not the reverse, it can add a field like:
private InterfaceA wrapped = GWT.create(InterfaceA.class);
Then it implements all InterfaceA's methods and forward call to the
wrapped field.
If none of them can know the other interface (like generators from two
frameworks), you can create an InterfaceC that extends InterfaceA and
InterfaceB. You add a generator that proxy all call to some wrapped
field like in the previous case, but for the two interfaces.
Do you like it?
Olivier
On 14 juin, 16:14, Kevin Qiu <
kevin.jing....@gmail.com> wrote:
> e.g.,
>
> class Foo implements InterfaceA, InterfaceB {
>
> }
>
> and in .gwt.xml file, you have
> <generate-with class="generatorA">
> <when-type-assignable class="InterfaceA" />
> </generate-with>
>
> <generate-with class="generatorB">
> <when-type-assignable class="InterfaceB" />
> </generate-with>
>
> How do I write generatorA and generatorB so that they generate the same
> file, but cascading the effects? Obviously, I'm only looking for general
> directions, not specific details.
>
> Thanks,
>
> > <
google-web-toolkit%2Bunsu...@googlegroups.com<
google-web-toolkit%252Buns...@googlegroups.com>