C
- The type of components to assemblepublic class FileGenerator<C> extends Generator<C>
Constructor and Description |
---|
FileGenerator(Assembler<C> assembler)
Assemble a file using the given assembler into a temporary directory.
|
FileGenerator(Assembler<C> assembler,
java.io.File dir)
Assemble a file using the given assembler into the given directory.
|
FileGenerator(Assembler<C> assembler,
java.util.function.Supplier<java.io.File> fileSupplier)
Assemble a file using the given assembler into the given directory.
|
Modifier and Type | Method and Description |
---|---|
FileGenerationMetrics |
generate(C component)
Generate a file from a single component.
|
FileGenerationMetrics |
generate(java.util.Enumeration<C> components)
Generate a file by assembling components.
|
FileGenerationMetrics |
generate(java.lang.Iterable<C> components)
Generate a file by assembling components.
|
FileGenerationMetrics |
generate(java.util.Iterator<C> components)
Generate a file by assembling components.
|
public FileGenerator(Assembler<C> assembler)
assembler
- The assembler to build up the filepublic FileGenerator(Assembler<C> assembler, java.io.File dir)
assembler
- The assembler to build up the filedir
- The directory in which to generate the filepublic FileGenerator(Assembler<C> assembler, java.util.function.Supplier<java.io.File> fileSupplier)
assembler
- The assembler to build up the filefileSupplier
- A function that supplies the file to write topublic FileGenerationMetrics generate(java.lang.Iterable<C> components) throws java.io.IOException
components
- The components to assemblejava.io.IOException
- When an I/O error occurspublic FileGenerationMetrics generate(java.util.Iterator<C> components) throws java.io.IOException
components
- The components to assemblejava.io.IOException
- When an I/O error occurspublic FileGenerationMetrics generate(java.util.Enumeration<C> components) throws java.io.IOException
components
- The components to assemblejava.io.IOException
- When an I/O error occurspublic FileGenerationMetrics generate(C component) throws java.io.IOException
component
- The component to generate the file fromjava.io.IOException
- When an I/O error occurs