Class JavaGenerator
java.lang.Object
uk.co.real_logic.sbe.generation.java.JavaGenerator
- All Implemented Interfaces:
CodeGenerator
Generate codecs for the Java 8 programming language.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaGenerator(Ir ir, String mutableBuffer, String readOnlyBuffer, boolean shouldGenerateGroupOrderAnnotation, boolean shouldGenerateInterfaces, boolean shouldDecodeUnknownEnumValues, boolean shouldSupportTypesPackageNames, DynamicPackageOutputManager outputManager) Create a new Java languageCodeGenerator.JavaGenerator(Ir ir, String mutableBuffer, String readOnlyBuffer, boolean shouldGenerateGroupOrderAnnotation, boolean shouldGenerateInterfaces, boolean shouldDecodeUnknownEnumValues, boolean shouldSupportTypesPackageNames, PrecedenceChecks precedenceChecks, DynamicPackageOutputManager outputManager) Create a new Java languageCodeGenerator.JavaGenerator(Ir ir, String mutableBuffer, String readOnlyBuffer, boolean shouldGenerateGroupOrderAnnotation, boolean shouldGenerateInterfaces, boolean shouldDecodeUnknownEnumValues, DynamicPackageOutputManager outputManager) Create a new Java languageCodeGenerator. -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate()Generate the complete set of types and messages for a schema.voidGenerate the composites for dealing with the message header.voidGenerate the stubs for the types used as message fields.
-
Constructor Details
-
JavaGenerator
public JavaGenerator(Ir ir, String mutableBuffer, String readOnlyBuffer, boolean shouldGenerateGroupOrderAnnotation, boolean shouldGenerateInterfaces, boolean shouldDecodeUnknownEnumValues, DynamicPackageOutputManager outputManager) Create a new Java languageCodeGenerator. Generator support for types in their own package is disabled.- Parameters:
ir- for the messages and types.mutableBuffer- implementation used for mutating underlying buffers.readOnlyBuffer- implementation used for reading underlying buffers.shouldGenerateGroupOrderAnnotation- in the codecs.shouldGenerateInterfaces- for common methods.shouldDecodeUnknownEnumValues- generate support for unknown enum values when decoding.outputManager- for generating the codecs to.
-
JavaGenerator
public JavaGenerator(Ir ir, String mutableBuffer, String readOnlyBuffer, boolean shouldGenerateGroupOrderAnnotation, boolean shouldGenerateInterfaces, boolean shouldDecodeUnknownEnumValues, boolean shouldSupportTypesPackageNames, DynamicPackageOutputManager outputManager) Create a new Java languageCodeGenerator.- Parameters:
ir- for the messages and types.mutableBuffer- implementation used for mutating underlying buffers.readOnlyBuffer- implementation used for reading underlying buffers.shouldGenerateGroupOrderAnnotation- in the codecs.shouldGenerateInterfaces- for common methods.shouldDecodeUnknownEnumValues- generate support for unknown enum values when decoding.shouldSupportTypesPackageNames- generator support for types in their own package.outputManager- for generating the codecs to.
-
JavaGenerator
public JavaGenerator(Ir ir, String mutableBuffer, String readOnlyBuffer, boolean shouldGenerateGroupOrderAnnotation, boolean shouldGenerateInterfaces, boolean shouldDecodeUnknownEnumValues, boolean shouldSupportTypesPackageNames, PrecedenceChecks precedenceChecks, DynamicPackageOutputManager outputManager) Create a new Java languageCodeGenerator.- Parameters:
ir- for the messages and types.mutableBuffer- implementation used for mutating underlying buffers.readOnlyBuffer- implementation used for reading underlying buffers.shouldGenerateGroupOrderAnnotation- in the codecs.shouldGenerateInterfaces- for common methods.shouldDecodeUnknownEnumValues- generate support for unknown enum values when decoding.shouldSupportTypesPackageNames- generator support for types in their own package.precedenceChecks- whether and how to generate field precedence checks.outputManager- for generating the codecs to.
-
-
Method Details
-
generateMessageHeaderStub
Generate the composites for dealing with the message header.- Throws:
IOException- if an error is encountered when writing the output.
-
generateTypeStubs
Generate the stubs for the types used as message fields.- Throws:
IOException- if an error is encountered when writing the output.
-
generate
Generate the complete set of types and messages for a schema.- Specified by:
generatein interfaceCodeGenerator- Throws:
IOException- if an error is encountered when writing the output.
-