Class UtilPrintQuote

java.lang.Object
org.libxmq.imp.UtilQuote
org.libxmq.imp.UtilPrintQuote

public class UtilPrintQuote extends UtilQuote
Utility for printing xmq quotes.
  • Field Details

    • num_nl_

      protected int num_nl_
      How many newlines.
    • max_num_consecutive_single_quotes_

      protected int max_num_consecutive_single_quotes_
      The maximum number of consecutive single quotes found in the buffer.
    • max_num_consecutive_double_quotes_

      protected int max_num_consecutive_double_quotes_
      The maximum number of consecutive double quotes found in the buffer.
    • num_cr_

      protected int num_cr_
      The number of carriage returns found in the buffer.
    • num_tab_

      protected int num_tab_
      The number of tabs found in the buffer.
    • starts_or_ends_with_double_quote_

      protected boolean starts_or_ends_with_double_quote_
      True if the buffer starts or ends with a double quote.
    • starts_or_ends_with_single_quote_

      protected boolean starts_or_ends_with_single_quote_
      True if the buffer starts or ends with a single quote.
    • needs_compound_

      protected boolean needs_compound_
      True if the buffer needs a compound marker.
  • Constructor Details

    • UtilPrintQuote

      protected UtilPrintQuote(String b)
      Creates a quote printer.
      Parameters:
      b - The buffer to print.
  • Method Details

    • renderQuote

      public static String renderQuote(String q, int indent)
      Renders a quote, possibly multiline, with the given indent.
      Parameters:
      q - The quote to render.
      indent - The indent to use.
      Returns:
      The rendered quote.
    • buildCompactQuote

      protected String buildCompactQuote(int indent)
      Builds a compact single-line quote.
      Parameters:
      indent - The indent to use.
      Returns:
      The compact quote.
    • buildMultilineQuote

      protected String buildMultilineQuote(int indent)
      Builds a multiline quote.
      Parameters:
      indent - The indent to use.
      Returns:
      The multiline quote.
    • analyzeForPrint

      protected void analyzeForPrint()
      Analyzes the buffer for printing.