Class GolangOutputManager
java.lang.Object
uk.co.real_logic.sbe.generation.golang.GolangOutputManager
- All Implemented Interfaces:
OutputManager
OutputManager for managing the creation of golang source files as the target of code generation.
The character encoding for the Writer is UTF-8.-
Constructor Summary
ConstructorsConstructorDescriptionGolangOutputManager(String baseDirName, String namespaceName) Create a newOutputManagerfor generating golang source files into a given package. -
Method Summary
Modifier and TypeMethodDescriptioncreateOutput(String name) Create a new output which will be a golang source file in the given package.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.agrona.generation.OutputManager
withOutput
-
Constructor Details
-
GolangOutputManager
Create a newOutputManagerfor generating golang source files into a given package.- Parameters:
baseDirName- for the generated source code.namespaceName- for the generated source code relative to the baseDirName.
-
-
Method Details
-
createOutput
Create a new output which will be a golang source file in the given package.The
Writershould be closed once the caller has finished with it. The Writer is buffered for efficient IO operations.- Specified by:
createOutputin interfaceOutputManager- Parameters:
name- the name of the golang class.- Returns:
- a
Writerto which the source code should be written. - Throws:
IOException- if an issue occurs when creating the file.
-