Tabnine Logo
GenerationUtil.concatEncodingTokens
Code IndexAdd Tabnine to your IDE (free)

How to use
concatEncodingTokens
method
in
uk.co.real_logic.sbe.ir.GenerationUtil

Best Java code snippets using uk.co.real_logic.sbe.ir.GenerationUtil.concatEncodingTokens (Showing top 2 results out of 315)

origin: uk.co.real-logic/sbe

public void generateMessageHeaderStub() throws IOException
{
  final List<Token> tokens = ir.headerStructure().tokens();
  final Token firstToken = tokens.get(0);
  try (final Writer out = outputManager.createOutput(MESSAGE_HEADER_ENCODER_TYPE))
  {
    generateFixedFlyweightHeader(firstToken, MESSAGE_HEADER_ENCODER_TYPE, out, mutableBuffer, fullMutableBuffer);
    out.append(concatEncodingTokens(tokens,
      (token) -> generatePrimitiveEncoder(MESSAGE_HEADER_ENCODER_TYPE, token.name(), token, BASE_INDENT)));
    out.append("}\n");
  }
  try (final Writer out = outputManager.createOutput(MESSAGE_HEADER_DECODER_TYPE))
  {
    generateFixedFlyweightHeader(firstToken, MESSAGE_HEADER_DECODER_TYPE, out, readOnlyBuffer, fullReadOnlyBuffer);
    out.append(concatEncodingTokens(tokens,
      (token) -> generatePrimitiveDecoder(token.name(), token, BASE_INDENT)));
    out.append("}\n");
  }
}
origin: uk.co.real-logic/sbe

private void generateComposite(final List<Token> tokens) throws IOException
{
  final Token token = tokens.get(0);
  final String compositeName = formatClassName(token.name());
  final String decoderName = decoderName(compositeName);
  final String encoderName = encoderName(compositeName);
  final List<Token> messageBody = getMessageBody(tokens);
  try (final Writer out = outputManager.createOutput(decoderName))
  {
    generateFixedFlyweightHeader(token, decoderName, out, readOnlyBuffer, fullReadOnlyBuffer);
    out.append(concatEncodingTokens(messageBody,
      (tok) -> generatePrimitiveDecoder(tok.name(), tok, BASE_INDENT)));
    out.append("}\n");
  }
  try (final Writer out = outputManager.createOutput(encoderName))
  {
    generateFixedFlyweightHeader(token, encoderName, out, mutableBuffer, fullMutableBuffer);
    out.append(concatEncodingTokens(messageBody,
      (tok) -> generatePrimitiveEncoder(encoderName, tok.name(), tok, BASE_INDENT)));
    out.append("}\n");
  }
}
uk.co.real_logic.sbe.irGenerationUtilconcatEncodingTokens

Popular methods of GenerationUtil

  • collectGroups
  • concatTokens
  • getMessageBody
  • collect
  • collectFields
  • collectVarData
  • findEndSignal
  • findSubGroupNames
  • collectRootFields

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now