Class GeneratedFileWriter

java.lang.Object
org.drools.codegen.common.GeneratedFileWriter

public class GeneratedFileWriter extends Object
Writes GeneratedFile to the right directory, depending on its GeneratedFileType.Category
  • Method Details

    • builder

      public static GeneratedFileWriter.Builder builder(String finalPath, String resourcesDirectoryProperty, String sourcesDirectoryProperty)
      Parameters:
      finalPath - e.g. "drools" or "kogito"
      resourcesDirectoryProperty - e.g. "drools.codegen.resources.directory" or "kogito.codegen.resources.directory"
      sourcesDirectoryProperty - e.g. "drools.codegen.sources.directory" or "kogito.codegen.sources.directory"
      Returns:
    • writeAll

      public void writeAll(Collection<GeneratedFile> generatedFiles)
    • write

      public void write(GeneratedFile f) throws UncheckedIOException
      Throws:
      UncheckedIOException
    • getClassesDir

      public Path getClassesDir()
    • getResourcePath

      public Path getResourcePath()
    • getScaffoldedSourcesDir

      public Path getScaffoldedSourcesDir()