类 StringPrinter<StringConfig extends StringPrinterConfig>

java.lang.Object
org.aya.pretty.backend.string.StringPrinter<StringConfig>
所有已实现的接口:
Cursor.CursorAPI, Printer<String,StringConfig>
直接已知子类:
DocHtmlPrinter, DocTeXPrinter

public class StringPrinter<StringConfig extends StringPrinterConfig> extends Object implements Printer<String,StringConfig>, Cursor.CursorAPI
The class for all string-output printers.
  • 字段详细资料

  • 构造器详细资料

    • StringPrinter

      public StringPrinter()
  • 方法详细资料

    • makeIndent

      @NotNull public @NotNull String makeIndent(int indent)
      指定者:
      makeIndent 在接口中 Cursor.CursorAPI
    • render

      @NotNull public @NotNull String render(@NotNull StringConfig config, @NotNull @NotNull Doc doc)
      从接口复制的说明: Printer
      Render a Doc object with a config.
      指定者:
      render 在接口中 Printer<String,StringConfig extends StringPrinterConfig>
      参数:
      config - printer config
      doc - doc object
      返回:
      rendered content
    • predictWidth

      protected int predictWidth(@NotNull @NotNull Cursor cursor, @NotNull @NotNull Doc doc)
    • fitsBetter

      @NotNull protected @NotNull Doc fitsBetter(@NotNull @NotNull Cursor cursor, @NotNull @NotNull Doc a, @NotNull @NotNull Doc b)
    • renderHeader

      protected void renderHeader(@NotNull @NotNull Cursor cursor)
    • renderFooter

      protected void renderFooter(@NotNull @NotNull Cursor cursor)
    • renderDoc

      protected void renderDoc(@NotNull @NotNull Cursor cursor, @NotNull @NotNull Doc doc)
    • renderSpecialSymbol

      protected void renderSpecialSymbol(@NotNull @NotNull Cursor cursor, @NotNull @NotNull String text)
    • renderNest

      protected void renderNest(@NotNull @NotNull Cursor cursor, @NotNull Doc.Nest nest)
    • renderUnionDoc

      protected void renderUnionDoc(@NotNull @NotNull Cursor cursor, @NotNull Doc.Union union)
    • renderFlatAlt

      protected void renderFlatAlt(@NotNull @NotNull Cursor cursor, @NotNull Doc.FlatAlt alt)
    • renderHyperLinked

      protected void renderHyperLinked(@NotNull @NotNull Cursor cursor, @NotNull Doc.HyperLinked text)
    • renderStyled

      protected void renderStyled(@NotNull @NotNull Cursor cursor, @NotNull Doc.Styled styled)
    • renderPlainText

      protected void renderPlainText(@NotNull @NotNull Cursor cursor, @NotNull @NotNull String content)
    • renderHardLineBreak

      protected void renderHardLineBreak(@NotNull @NotNull Cursor cursor)