Class GeneratedFileWriter


  • public class GeneratedFileWriter
    extends java.lang.Object
    • Field Detail

      • DEFAULT_SOURCES_DIR

        public static final java.lang.String DEFAULT_SOURCES_DIR
        See Also:
        Constant Field Values
      • DEFAULT_RESOURCE_PATH

        public static final java.lang.String DEFAULT_RESOURCE_PATH
        See Also:
        Constant Field Values
      • DEFAULT_SCAFFOLDED_SOURCES_DIR

        public static final java.lang.String DEFAULT_SCAFFOLDED_SOURCES_DIR
        See Also:
        Constant Field Values
      • DEFAULT_CLASSES_DIR

        public static final java.lang.String DEFAULT_CLASSES_DIR
        See Also:
        Constant Field Values
    • Constructor Detail

      • GeneratedFileWriter

        public GeneratedFileWriter​(java.nio.file.Path classesDir,
                                   java.nio.file.Path sourcesDir,
                                   java.nio.file.Path resourcePath,
                                   java.nio.file.Path scaffoldedSourcesDir)
        Parameters:
        classesDir - usually DEFAULT_CLASSES_DIR
        sourcesDir - usually target/generated-sources/kogito/. See DEFAULT_SOURCES_DIR
        resourcePath - usually target/generated-resources/kogito/ DEFAULT_RESOURCE_PATH
        scaffoldedSourcesDir - usually DEFAULT_SCAFFOLDED_SOURCES_DIR
    • Method Detail

      • writeAll

        public void writeAll​(java.util.Collection<org.drools.codegen.common.GeneratedFile> generatedFiles)
      • write

        public void write​(org.drools.codegen.common.GeneratedFile f)
                   throws java.io.UncheckedIOException
        Throws:
        java.io.UncheckedIOException
      • getClassesDir

        public java.nio.file.Path getClassesDir()
      • getSourcesDir

        public java.nio.file.Path getSourcesDir()
      • getResourcePath

        public java.nio.file.Path getResourcePath()
      • getScaffoldedSourcesDir

        public java.nio.file.Path getScaffoldedSourcesDir()