code: public <T> void generateFromStringTemplate(T model, String parameters[], String outputPath, String content) throws IOException {
          if (model instanceof TypeDef) {
              generateFromStringTemplate((TypeDef) model, parameters, content);
          } else if (outputPath == null || outputPath.isEmpty()) {
              throw new IllegalArgumentException("Please specify either an outout path or a model that implies one (e.g. a class definition).");
          } else if (outputPath.endsWith(SOURCE_SUFFIX)) {
              String fqcn = outputPath.substring(0 , outputPath.length() - SOURCE_SUFFIX.length()).replaceAll("/|\\\\", ".");
              generateFromStringTemplate(model, parameters, processingEnv.getFiler().createSourceFile(fqcn), content);
          } else {
              generateFromStringTemplate(model, parameters, processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", outputPath), content);
          }
      }
docs: Generates a source file from the specified {@link io.sundr.codegen.model.TypeDef}.
  
  @param model         The model of the class to generate.
  @param outputPath    Where to save the generated class.
  @param content       The template to use.
  @throws IOException  If it fails to create the source file.