There are two kinds of deferred binding rules: replace-with and 
generate-with.

replace-with rules are used to switch between several implementations 
depending on binding properties (e.g. <when-property-is name="user.agent" 
value="ie6" />)

generate-with on the other hand calls a Generator for the class or 
interface. Such a rule can also use binding properties as conditions (you 
can even say "replace-with that class when such property is X; and generate 
with that one otherwise") but it's generally not the case.
The generator is passed the class/interface that's being GWT.create()d and 
uses reflection (not java.lang.reflect though) to generate one or several 
files, which generally include Java source code (that will be compiled just 
after being generated) but an also include other kinds of files (e.g. 
images or CSS files, in the case of ClientBundle or ImageBundle).

In the case of RPC services, the rule reads:
<generate-with 
class="com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator">
<when-type-assignable class="com.google.gwt.user.client.rpc.RemoteService"/>
</generate-with>
and the ServiceInterfaceProxyGenerator generates the Xxx_Proxy class you're 
seeing in DevMode (which is also compiled on-the-fly).

Generators are used a lot in GWT: for I18N (Messages, Constants), UiBinder, 
ClientBundle, ImageBundle, SafeHtmlTemplates, PlaceHistoryMapper, 
AutoBeans, RequestFactory, RPC, etc.

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