Class PrecedenceChecks
java.lang.Object
uk.co.real_logic.sbe.generation.common.PrecedenceChecks
A factory for creating a
FieldPrecedenceModel for a message from its IR tokens.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe context describing how precedence checks should be generated. -
Method Summary
Modifier and TypeMethodDescriptioncontext()Returns thePrecedenceChecks.Contextdescribing how precedence checks should be generated.createCodecModel(String stateClassName, List<Token> msgTokens) Creates aFieldPrecedenceModelfor the given message tokens, unless precedence checks are disabled, in which casenullis returned.createDecoderModel(String stateClassName, List<Token> msgTokens) Creates aFieldPrecedenceModelfor the given message tokens, unless precedence checks are disabled, in which casenullis returned.createEncoderModel(String stateClassName, List<Token> msgTokens) Creates aFieldPrecedenceModelfor the given message tokens, unless precedence checks are disabled, in which casenullis returned.static PrecedenceChecksnewInstance(PrecedenceChecks.Context context) Creates a newPrecedenceChecksinstance.
-
Method Details
-
createEncoderModel
Creates aFieldPrecedenceModelfor the given message tokens, unless precedence checks are disabled, in which casenullis returned.Only the latest version of the message is considered when creating the model.
- Parameters:
stateClassName- the name of the generated class that models the state of the encoder.msgTokens- the tokens of the message.- Returns:
- a
FieldPrecedenceModelfor the given message tokens ornullif precedence checks are disabled.
-
createDecoderModel
Creates aFieldPrecedenceModelfor the given message tokens, unless precedence checks are disabled, in which casenullis returned.All versions of the message are considered when creating the model.
- Parameters:
stateClassName- the name of the generated class that models the state of the decoder.msgTokens- the tokens of the message.- Returns:
- a
FieldPrecedenceModelfor the given message tokens ornullif precedence checks are disabled.
-
createCodecModel
Creates aFieldPrecedenceModelfor the given message tokens, unless precedence checks are disabled, in which casenullis returned.All versions of the message are considered when creating the model.
- Parameters:
stateClassName- the name of the generated class that models the state of the codec.msgTokens- the tokens of the message.- Returns:
- a
FieldPrecedenceModelfor the given message tokens ornullif precedence checks are disabled.
-
context
Returns thePrecedenceChecks.Contextdescribing how precedence checks should be generated.- Returns:
- the
PrecedenceChecks.Contextdescribing how precedence checks should be generated.
-
newInstance
Creates a newPrecedenceChecksinstance.- Parameters:
context- thePrecedenceChecks.Contextdescribing how precedence checks should be generated.- Returns:
- a new
PrecedenceChecksinstance.
-