anchor.diff:    {
       final <%= struct.imit.jso_name %> entity = com.google.gwt.core.client.JavaScriptObject.createObject().cast();
   <% struct.fields.each do |field|
  -     if :sequence == field.collection_type
  -%>    entity.set<%= field.name %>( java.util.Collections.unmodifiableList( new java.util.ArrayList<<%= field.imit.java_component_type %>>( <%= field.name %> ) ) );
  -<%     elsif :set == field.collection_type
  -%>    entity.set<%= field.name %>( java.util.Collections.unmodifiableSet( new java.util.HashSet<<%= field.imit.java_component_type %>>( <%= field.name %> ) ) );
  -  <%     else
  +     if :none == field.collection_type
   %>    entity.set<%= field.name %>( <%= field.name %> );
  +<%     else
  +    gwt_type =
  +      case
  +        when field.date? || field.text? || field.enumeration? then "com.google.gwt.core.client.JsArrayString"
  +        when field.integer? then "com.google.gwt.core.client.JsArrayInteger"
  +        when field.boolean? then "com.google.gwt.core.client.JsArrayBoolean"
  +        when field.struct? then "com.google.gwt.core.client.JsArray<#{field.referenced_struct.imit.qualified_jso_name}>"
  +        else (raise "Unsupported field type #{field.name}")
  +      end
  +    gwt_creator =
  +      case
  +        when field.date? || field.text? || field.enumeration? then "StringArray"
  +        when field.integer? then "IntegerArray"
  +        when field.boolean? then "BooleanArray"
  +        when field.struct? then "ObjectArray"
  +        else (raise "Unsupported field type #{field.name}")
  +      end
  +    converted_value =
  +      case
  +        when field.struct? then "(#{field.referenced_struct.imit.jso_name})v"
  +        when field.date? then "v.toString()"
  +        when field.enumeration? then field.enumeration.textual_values? ? "v.name()" : "v.ordinal()"
  +        else "v"
  +      end
  +%>
  +    final <%= gwt_type %> $<%= field.name %> = newNative<%= gwt_creator %>();
  +    for ( final <%= field.imit.java_component_type %> v : <%= field.name %> )
  +    {
  +      $<%= field.name %>.push( <%= converted_value %> );
  +    }
  +
  +    entity.set<%= field.name %>( $<%= field.name %> );
   <%   end
      end
   %>    return entity;
     }
   
  +  private static native com.google.gwt.core.client.JsArrayString newNativeStringArray() /*-{ return []; }-*/;
  +  private static native com.google.gwt.core.client.JsArrayInteger newNativeIntegerArray() /*-{ return []; }-*/;
  +  private static native <E extends com.google.gwt.core.client.JavaScriptObject> com.google.gwt.core.client.JsArray<E> newNativeObjectArray() /*-{ return []; }-*/;
  +
   <% struct.fields.select{|field| field.imit?}.each do |field|
  +  if field.collection? 
  +    collection_type_impl = field.collection_type == :set ? "HashSet" : "ArrayList"
  +    gwt_type_suffix =
  +      case
  +        when field.date? || field.text? || field.enumeration? then "String"
  +        when field.integer? then "Integer"
  +        when field.boolean? then "Boolean"
  +        when field.struct? then "<#{field.referenced_struct.imit.qualified_jso_name}>"
  +        else (raise "Unsupported field type #{field.name}")
  +      end
  +    conversion_rule =
  +      case
  +        when field.date? then Proc.new {|field, transport_value| "org.realityforge.replicant.client.RDate.parse( #{transport_value} )"}
  +        when field.enumeration? then Proc.new {|field, transport_value| "#{field.imit.java_type}.#{field.enumeration.textual_values? ? "valueOf( #{transport_value} )" : "values()[ #{transport_value} ]"}"}
  +        else nil
  +      end
  +
  +      component_type = field.struct? ? field.referenced_struct.imit.qualified_jso_name : field.imit.java_component_type
  +%>
  +  public final <%= annotated_type(field, :imit) %> <%= getter_prefix(field) %><%= field.name %>()
  +  {
  +<% if conversion_rule.nil? %>
  +    return (<%= field.imit.java_type %>)new org.realityforge.replicant.client.json.gwt.JsoReadOnly<%= field.struct? ? "" : gwt_type_suffix %><%= field.collection_type == :set ? "Set" : "List" %><%= field.struct? ? "<#{component_type}>" : "" %>( <%= getter_prefix(field) %><%= field.name %>0() );
  +<% else %>
  +    final com.google.gwt.core.client.JsArray<%= gwt_type_suffix %> source = <%= getter_prefix(field) %><%= field.name %>0();
  +    final java.util.<%= collection_type_impl %><<%= field.imit.java_component_type %>> collection = new java.util.<%= collection_type_impl %><<%= field.imit.java_component_type %>>();
  +    final int size = source.length();
  +    for( int i = 0; i < size; i++ )
  +    {
  +      collection.add( org.realityforge.replicant.client.RDate.parse( source.get( i ) ) );
  +    }
  +    return java.util.Collections.unmodifiable<%= field.collection_type == :set ? "Set" : "List" %>( collection );
  +<% end %>
  +  }
  +
  +  private final native com.google.gwt.core.client.JsArray<%= gwt_type_suffix %> <%= getter_prefix(field) %><%= field.name %>0() /*-{
  +    return this.<%= field.json.name %>;
  +  }-*/;
  +
  +  private final native void set<%= field.name %>( com.google.gwt.core.client.JsArray<%= gwt_type_suffix %> value ) /*-{
  +    this.<%= field.json.name %> = value;
  +  }-*/;
  +<%
  +   else
   %>
     public final native <%= annotated_type(field, :imit) %> <%= getter_prefix(field) %><%= field.name %>() /*-{
       return this.<%= field.json.name %>;
  
positive.code: package <%= struct.data_module.imit.data_type_package %>;
  
  <%= description_javadoc_for(struct, "") %>@javax.annotation.Generated( "Domgen" )
  @SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
  final class <%= struct.imit.jso_name %>
    extends com.google.gwt.core.client.JavaScriptObject
    implements <%= struct.imit.qualified_name %>
  
negative.code:     this.<%= field.json.name %> = value;
    }-*/;
  <% end
    end
  %>
  <% if struct.top_level? %>
    protected static <%= struct.imit.jso_name %> as<%= struct.imit.name %>( final String json )
  