Hi, Dean
Thank you very much for your reply, I'm very appreciate it.
In my situation, it's looks like following:
<generate-with class="test.InterfaceA__ProxyGenerator">
<when-type-assignable class="InterfaceA"/>
</generate-with>
<generate-with class="test.InterfaceB__ProxyGenerator">
<when-type-assignable class="InterfaceB"/>
</generate-with>
Then, I have a class implements these interfaces
public class TestGenerator implements InterfaceA, InterfaceB{
}
Then what happend?
In my case, GWT only invoke one generator for class "TestGenerator",
but I expect should two?
The generator can apply to classes as well, but I don't care if it's
only apply to interfaces. both are fine for me.
I noticed it's fine to call a generator from generator generated
code, but this request one generator need know other generator, it's
not good enough for design, how do you think?
Regards
James
On Aug 27, 12:35 pm, "Dean S. Jones" <[email protected]> wrote:
> first, Generators apply to interfaces, not classes, and yes, it's one
> generator per interface... you can choose a generator based on a
> property,
> like the DOMImpl interfaces:
>
> <replace-with class="com.google.gwt.dom.client.DOMImplSafari">
> <when-type-is class="com.google.gwt.dom.client.DOMImpl"/>
> <when-property-is name="user.agent" value="safari"/>
> </replace-with>
>
> this may change your thinking:
>
> interfaces can extend other interfaces. A Generator can enumerate the
> inherited interfaces, and implement them as it sees fit.
>
> also, it's perfectly fine to call a Generator from Generator generated
> code, as in, you can generate the line:
>
> private Thing m_thing = GWT.create(Thing.class);
>
> and the secondary Generator will kick in when the m_thing is created.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
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
-~----------~----~----~----~------~----~------~--~---