Package org.agrona.generation
Interface OutputManager
- All Known Subinterfaces:
DynamicPackageOutputManager
- All Known Implementing Classes:
PackageOutputManager
,StringWriterOutputManager
public interface OutputManager
Abstraction that manages the destination of generated output.
-
Method Summary
Modifier and TypeMethodDescriptioncreateOutput
(String name) Create a new output destination based on a name.default void
withOutput
(String name, ResourceConsumer<Writer> resourceConsumer) Create named output and callResourceConsumer.accept(Object)
.
-
Method Details
-
createOutput
Create a new output destination based on a name. The user is responsible for callingWriter.close()
.- Parameters:
name
- of the given output.- Returns:
- A
Writer
to which the code generation should be output. - Throws:
IOException
- if an error occurs during output.
-
withOutput
Create named output and callResourceConsumer.accept(Object)
.- Parameters:
name
- name of the output to create.resourceConsumer
- to be called.
-