code: public static void writeModel(HttpServletRequest request,
  			HttpServletResponse response, Class<?> clazz, OutputFormat format,
  			IncludeValidation includeValidation, boolean debug) throws IOException {
  		OutputConfig outputConfig = new OutputConfig();
  		outputConfig.setIncludeValidation(includeValidation);
  		outputConfig.setOutputFormat(format);
  		outputConfig.setDebug(debug);
  		ModelBean model = createModel(clazz, outputConfig);
  		writeModel(request, response, model, outputConfig);
  	}
docs: Instrospects the provided class, creates a model object (JS code) and writes it
  into the response.
  
  @param request the http servlet request
  @param response the http servlet response
  @param clazz class that the generator should introspect
  @param format specifies which code (ExtJS or Touch) the generator should create
  @param includeValidation specifies if any validation configurations should be added
  to the model code
  @param debug if true the generator creates the output in pretty format, false the
  output is compressed
  @throws IOException