Class PrecedenceChecks

java.lang.Object
uk.co.real_logic.sbe.generation.common.PrecedenceChecks

public final class PrecedenceChecks extends Object
A factory for creating a FieldPrecedenceModel for a message from its IR tokens.
  • Method Details

    • createEncoderModel

      public FieldPrecedenceModel createEncoderModel(String stateClassName, List<Token> msgTokens)
      Creates a FieldPrecedenceModel for the given message tokens, unless precedence checks are disabled, in which case null is 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 FieldPrecedenceModel for the given message tokens or null if precedence checks are disabled.
    • createDecoderModel

      public FieldPrecedenceModel createDecoderModel(String stateClassName, List<Token> msgTokens)
      Creates a FieldPrecedenceModel for the given message tokens, unless precedence checks are disabled, in which case null is 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 FieldPrecedenceModel for the given message tokens or null if precedence checks are disabled.
    • createCodecModel

      public FieldPrecedenceModel createCodecModel(String stateClassName, List<Token> msgTokens)
      Creates a FieldPrecedenceModel for the given message tokens, unless precedence checks are disabled, in which case null is 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 FieldPrecedenceModel for the given message tokens or null if precedence checks are disabled.
    • context

      public PrecedenceChecks.Context context()
      Returns the PrecedenceChecks.Context describing how precedence checks should be generated.
      Returns:
      the PrecedenceChecks.Context describing how precedence checks should be generated.
    • newInstance

      public static PrecedenceChecks newInstance(PrecedenceChecks.Context context)
      Creates a new PrecedenceChecks instance.
      Parameters:
      context - the PrecedenceChecks.Context describing how precedence checks should be generated.
      Returns:
      a new PrecedenceChecks instance.