code: public JavaFile generate() {
      MethodSpec privateConstructor = MethodSpec.constructorBuilder()
          .addModifiers(Modifier.PRIVATE)
          .build();
  
      TypeSpec.Builder casesClassBuilder = TypeSpec.classBuilder(className)
          .addModifiers(Modifier.PUBLIC, Modifier.FINAL)
          .addMethod(privateConstructor)
          .addMethods(methods);
  
      for (String javadoc : javadocs) {
        casesClassBuilder.addJavadoc(javadoc);
      }
  
      TypeSpec casesClass = casesClassBuilder.build();
  
      JavaFile.Builder javaFileBuilder = JavaFile.builder(packageName, casesClass);
  
      if (fileComment != null) {
        javaFileBuilder.addFileComment(fileComment);
      }
  
      javaFileBuilder.addFileComment("\nGenerated by Motif. Do Not Edit!\n");
  
      JavaFile javaFile = javaFileBuilder.build();
      return javaFile;
    }
docs: Generates the matching cases class and returns it as a {@link JavaFile}.