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_PRECEDENCE_CHECKS
Whether to generate field precedence checks.
|
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 |
JAVA_PRECEDENCE_CHECKS_PROPERTY_NAME
The name of the system property that enables access order checks at runtime
in generated Java code.
|
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 |
PRECEDENCE_CHECKS_FLAG_NAME
The name of the symbol or macro that enables access order checks when building
generated C# or C++ code.
|
static String |
SCHEMA_TRANSFORM_VERSION
Configuration option used to manage sinceVersion based transformations.
|
static String |
TARGET_LANGUAGE
Target language for generated code.
|
static String |
TARGET_NAMESPACE
String system property of the namespace for generated code.
|
static String |
TYPES_PACKAGE_OVERRIDE
Boolean system property to control the support of package names in
<types> elements. |
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 TYPES_PACKAGE_OVERRIDE
<types> elements.
Part of SBE v2-rc3. Defaults to false.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 final String SCHEMA_TRANSFORM_VERSION
This field can contain a list of ordered pairs in the form:
((<schema id> | '*') ':' <schema id>)(',' ((<schema id> | '*') ':' <schema id>))*
.
E.g. 123:5,*:6 which means transform schema with id = 123 to version 5, all others to version 6.
public static final String GENERATE_PRECEDENCE_CHECKS
public static final String PRECEDENCE_CHECKS_FLAG_NAME
public static final String JAVA_PRECEDENCE_CHECKS_PROPERTY_NAME
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-2024 Real Logic Limited. All Rights Reserved.