code: protected void writeHandler(IndentedWriter writer, String uiOwner,
  			String handlerVarName, JClassType handlerType,
  			JClassType eventType,
  			String boundMethod) throws UnableToCompleteException {
  
  		// Retrieves the single method (usually 'onSomething') related to all
  		// handlers. Ex: onClick in ClickHandler, onBlur in BlurHandler ...
  		JMethod[] methods = handlerType.getMethods();
  		if (methods.length != 1) {
  			logger.die("'%s' has more than one method defined.",
  					handlerType.getName());
  		}
  
  		// Checks if the method has an Event as parameter. Ex: ClickEvent in
  		// onClick, BlurEvent in onBlur ...
  		JParameter[] parameters = methods[0].getParameters();
  		if (parameters.length != 1 || parameters[0].getType() != eventType) {
  			logger.die("Method '%s' needs '%s' as parameter",
  					methods[0].getName(),
  					eventType.getName());
  		}
  
  		writer.newline();
  		writer.write("final %1$s %2$s = new %1$s() {",
  				handlerType.getParameterizedQualifiedSourceName(),
  				handlerVarName);
  		writer.indent();
  		writer.write("public void %1$s(%2$s event) {", methods[0].getName(),
  				eventType.getParameterizedQualifiedSourceName());
  		writer.indent();
  		writer.write("%1$s.%2$s(event);", uiOwner, boundMethod);
  		writer.outdent();
  		writer.write("}");
  		writer.outdent();
  		writer.write("};");
  	}
docs: Writes a handler entry using the given writer.
  
  @param writer
  the writer used to output the results
  @param uiOwner
  the name of the class evaluated here that owns the template
  @param handlerVarName
  the name of the handler variable
  @param handlerType
  the handler we want to create
  @param eventType
  the event associated with the handler
  @param boundMethod
  the method bound in the handler