public class SbeTool extends Object
Usage:
$ java -jar sbe.jar <filename.xml> $ java -Doption=value -jar sbe.jar <filename.xml> $ java -Doption=value -jar sbe.jar <filename.sbeir>
System Properties:
Modifier and Type | Field and Description |
---|---|
static String |
CPP_NAMESPACES_COLLAPSE
Boolean system property to toggle collapsing of nested namespaces in generated C++ stubs.
|
static String |
CSHARP_GENERATE_NAMESPACE_DIR
Boolean system property to turn on or off generation of namespace directories during csharp code generation.
|
static String |
DECODE_UNKNOWN_ENUM_VALUES
Should unknown enum values be decoded to support extension.
|
static String |
GENERATE_IR
Boolean system property to turn on or off generation of IR.
|
static String |
GENERATE_STUBS
Boolean system property to turn on or off generation of stubs.
|
static String |
JAVA_DECODING_BUFFER_TYPE
Specifies the name of the Java read only buffer to wrap.
|
static String |
JAVA_DEFAULT_DECODING_BUFFER_TYPE
Default class to use as the buffer read only implementation in generated code.
|
static String |
JAVA_DEFAULT_ENCODING_BUFFER_TYPE
Default class to use as the buffer mutable implementation in generated code.
|
static String |
JAVA_ENCODING_BUFFER_TYPE
Specifies the name of the Java mutable buffer to wrap.
|
static String |
JAVA_GENERATE_INTERFACES
Boolean system property to turn on or off generation of the interface hierarchy.
|
static String |
JAVA_GROUP_ORDER_ANNOTATION
Should the
GroupOrder annotation be added to generated stubs. |
static String |
JAVA_INTERFACE_PACKAGE
Package in which the generated Java interfaces will be placed.
|
static String |
KEYWORD_APPEND_TOKEN
Specifies token that should be appended to keywords to avoid compilation errors.
|
static String |
OUTPUT_DIR
Output directory for generated code.
|
static String |
TARGET_LANGUAGE
Target language for generated code.
|
static String |
TARGET_NAMESPACE
String system property of the namespace for generated code.
|
static String |
VALIDATION_STOP_ON_ERROR
Boolean system property to control throwing exceptions on all errors.
|
static String |
VALIDATION_SUPPRESS_OUTPUT
Boolean system property to control suppressing output on all errors and warnings.
|
static String |
VALIDATION_WARNINGS_FATAL
Boolean system property to control whether to consider warnings fatal and treat them as errors.
|
static String |
VALIDATION_XSD
System property to hold XSD to validate message specification against.
|
static String |
XINCLUDE_AWARE
Boolean system property to control is XInclude is supported.
|
Constructor and Description |
---|
SbeTool() |
Modifier and Type | Method and Description |
---|---|
static void |
generate(Ir ir,
String outputDirName,
String targetLanguage)
Generate SBE encoding and decoding stubs for a target language.
|
static void |
main(String[] args)
Main entry point for the SBE Tool.
|
static MessageSchema |
parseSchema(String sbeSchemaFilename)
Parse the message schema specification.
|
static void |
validateAgainstSchema(String sbeSchemaFilename,
String xsdFilename)
Validate the SBE Schema against the XSD.
|
public static final String JAVA_INTERFACE_PACKAGE
public static final String JAVA_DEFAULT_ENCODING_BUFFER_TYPE
public static final String JAVA_DEFAULT_DECODING_BUFFER_TYPE
public static final String VALIDATION_STOP_ON_ERROR
public static final String VALIDATION_WARNINGS_FATAL
public static final String VALIDATION_XSD
public static final String VALIDATION_SUPPRESS_OUTPUT
public static final String GENERATE_STUBS
public static final String XINCLUDE_AWARE
public static final String TARGET_LANGUAGE
public static final String GENERATE_IR
public static final String OUTPUT_DIR
public static final String TARGET_NAMESPACE
public static final String CPP_NAMESPACES_COLLAPSE
public static final String JAVA_GENERATE_INTERFACES
public static final String JAVA_ENCODING_BUFFER_TYPE
public static final String JAVA_DECODING_BUFFER_TYPE
public static final String JAVA_GROUP_ORDER_ANNOTATION
GroupOrder
annotation be added to generated stubs.public static final String CSHARP_GENERATE_NAMESPACE_DIR
public static final String KEYWORD_APPEND_TOKEN
If none is supplied then use of keywords results in an error during schema parsing. The underscore character is a good example of a token to use.
public static final String DECODE_UNKNOWN_ENUM_VALUES
If an unknown enum value is decoded then a language specific SBE_UNKNOWN enum value will be returned rather than throwing an error.
public static void main(String[] args) throws Exception
args
- command line arguments. A single filename is expected.Exception
- if an error occurs during process of the message schema.public static void validateAgainstSchema(String sbeSchemaFilename, String xsdFilename) throws Exception
sbeSchemaFilename
- to be validated.xsdFilename
- XSD against which to validate.Exception
- if an error occurs while validating.public static MessageSchema parseSchema(String sbeSchemaFilename) throws Exception
sbeSchemaFilename
- file containing the SBE specification to be parsed.MessageSchema
for the specification found in the file.Exception
- if an error occurs when parsing the specification.public static void generate(Ir ir, String outputDirName, String targetLanguage) throws Exception
ir
- for the parsed specification.outputDirName
- directory into which code will be generated.targetLanguage
- for the generated code.Exception
- if an error occurs while generating the code.Copyright © 2013-2022 Real Logic Limited. All Rights Reserved.