public class SbeTool extends Object
$ java -jar sbe.jar <filename.xml>
$ java -Doption=value -jar sbe.jar <filename.xml>
$ java -Doption=value -jar sbe.jar <filename.sbeir>
Properties
sbe.validation.xsd: Use XSD to validate or not.sbe.validation.stop.on.error: Should the parser stop on first error encountered? Defaults to false.sbe.validation.warnings.fatal: Are warnings in parsing considered fatal? Defaults to false.sbe.validation.suppress.output: Should the parser suppress output during validation? Defaults to false.sbe.generate.stubs: Generate stubs or not. Defaults to true.sbe.generate.ir: Generate IR or not. Defaults to false.sbe.target.language: Target language for code generation, defaults to Java.sbe.output.dir: Target directory for code generation, defaults to current directory.| Modifier and Type | Field and Description |
|---|---|
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 |
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
|
| 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 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 GENERATE_IR
public static final String TARGET_LANGUAGE
public static final String OUTPUT_DIR
public static final String TARGET_NAMESPACE
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 validatedxsdFilename - XSD against which to validateException - if an error occurs while validatingpublic static MessageSchema parseSchema(String sbeSchemaFilename) throws Exception
sbeSchemaFilename - file containing the SBE specification for theMessageSchema 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 Real Logic Ltd. All Rights Reserved.