<commit_before>/* DO NOT EDIT: File is auto-generated */
package <%= message.data_module.gwt.client_event_package %>;

@javax.annotation.Generated( "Domgen" )
public final class <%= message.gwt.event_name %>
  extends com.google.gwt.event.shared.GwtEvent<<%= message.gwt.event_handler_name %>>
{
  public static final Type<<%= message.gwt.event_handler_name %>> TYPE = new Type<<%= message.gwt.event_handler_name %>>();
<% message.parameters.each do |parameter|
%>  private final <%= parameter.gwt.java_type %> <%= parameter.gwt.name %>;
<% end %>

  public <%= message.gwt.event_name %>(<%= message.parameters.collect{|p| "final #{annotated_type(p, :gwt)} #{p.gwt.name}"}.join(", ") %>)
  {
<% message.parameters.select{|p| !p.nullable? && !p.gwt.primitive?}.each do |parameter|
%>    if( null == <%= parameter.gwt.name %> )
    {
      throw new IllegalArgumentException("<%= parameter.gwt.name %> is null");
    }
<% end %>
<% message.parameters.each do |parameter|
  if :sequence == parameter.collection_type
%>    this.<%= parameter.gwt.name %> = java.util.Collections.unmodifiableList( new java.util.ArrayList<<%= parameter.gwt.java_component_type %>>( <%= parameter.gwt.name %> ) );
<%     elsif :set == parameter.collection_type
  %>    this.<%= parameter.gwt.name %> = java.util.Collections.unmodifiableSet( new java.util.HashSet<<%= parameter.gwt.java_component_type %>>( <%= parameter.gwt.name %> ) );
<%     else
%>  this.<%= parameter.gwt.name %> = <%= parameter.gwt.name %>;
<% end
   end %>
  }

<% message.parameters.each do |parameter|
%>  public <%= annotated_type(parameter, :gwt) %> get<%= parameter.name %>()
  {
    return <%= parameter.gwt.name %>;
  }
<% end %>

  @Override
  public Type<<%= message.gwt.event_handler_name %>> getAssociatedType()
  {
    return TYPE;
  }

  @Override
  protected void dispatch( final <%= message.gwt.event_handler_name %> handler )
  {
    handler.on<%= message.name %>( this );
  }
}<commit_msg>Add toString and toDebugString methods to generated event<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= message.data_module.gwt.client_event_package %>;

@javax.annotation.Generated( "Domgen" )
public final class <%= message.gwt.event_name %>
  extends com.google.gwt.event.shared.GwtEvent<<%= message.gwt.event_handler_name %>>
{
  public static final Type<<%= message.gwt.event_handler_name %>> TYPE = new Type<<%= message.gwt.event_handler_name %>>();
<% message.parameters.each do |parameter|
%>  private final <%= parameter.gwt.java_type %> <%= parameter.gwt.name %>;
<% end %>

  public <%= message.gwt.event_name %>(<%= message.parameters.collect{|p| "final #{annotated_type(p, :gwt)} #{p.gwt.name}"}.join(", ") %>)
  {
<% message.parameters.select{|p| !p.nullable? && !p.gwt.primitive?}.each do |parameter|
%>    if( null == <%= parameter.gwt.name %> )
    {
      throw new IllegalArgumentException("<%= parameter.gwt.name %> is null");
    }
<% end %>
<% message.parameters.each do |parameter|
  if :sequence == parameter.collection_type
%>    this.<%= parameter.gwt.name %> = java.util.Collections.unmodifiableList( new java.util.ArrayList<<%= parameter.gwt.java_component_type %>>( <%= parameter.gwt.name %> ) );
<%     elsif :set == parameter.collection_type
  %>    this.<%= parameter.gwt.name %> = java.util.Collections.unmodifiableSet( new java.util.HashSet<<%= parameter.gwt.java_component_type %>>( <%= parameter.gwt.name %> ) );
<%     else
%>  this.<%= parameter.gwt.name %> = <%= parameter.gwt.name %>;
<% end
   end %>
  }

<% message.parameters.each do |parameter|
%>  public <%= annotated_type(parameter, :gwt) %> get<%= parameter.name %>()
  {
    return <%= parameter.gwt.name %>;
  }
<% end %>

  @Override
  public Type<<%= message.gwt.event_handler_name %>> getAssociatedType()
  {
    return TYPE;
  }

  @Override
  protected void dispatch( final <%= message.gwt.event_handler_name %> handler )
  {
    handler.on<%= message.name %>( this );
  }

  public String toDebugString()
  {
    return toString();
  }

  public String toString()
  {
    return "<%= message.name %>[" + <% if message.parameters.empty? -%>""<% else
    message.parameters.each_with_index do |parameter, i|
      value = parameter.reference? ? "#{parameter.name}.#{getter_prefix(parameter.referenced_entity.primary_key)}#{(parameter.referenced_entity.primary_key.name)}()" : parameter.name
      %> <%= i != 0 ? " + \"\, \" + " : "" %> "<%= parameter.name %>=" + <%= value %> <%
    end
    end -%> + "]";
  }
}
{'fraction_non_alphanumeric': 0.1955021153417947, 'fraction_numerical': 0.00022266755733689602, 'mean_word_length': 4.0642615558060875, 'pattern_counts': {'":': 0, '<': 92, '<?xml version=': 0, '>': 92, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '658523', 'n_tokens_mistral': 1618, 'n_tokens_neox': 1475, 'n_words': 262}