Packages

abstract class TagFormatter[Rep <: BaseFormatter[Rep]] extends BaseFormatter[Rep]

Base type for formatters that produce tag-based output formats like XML or HTML. Extends the BaseFormatter and adds methods for writing text with special characters as entities and for conveniently writing tags with attributes.

Self Type
TagFormatter[Rep] with Rep
Linear Supertypes
BaseFormatter[Rep], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TagFormatter
  2. BaseFormatter
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TagFormatter(renderChild: (Rep, Element) ⇒ String, currentElement: Element, parents: List[Element], pathTranslator: PathTranslator, indentation: Indentation, messageFilter: MessageFilter)

    renderChild

    the function to use for rendering child elements

    currentElement

    the active element currently being rendered

    parents

    the stack of parent elements of this formatter in recursive rendering, with the root element being the last in the list

    pathTranslator

    translates paths of input documents to the corresponding output path

    indentation

    the indentation mechanism for this formatter

    messageFilter

    the filter to apply before rendering runtime messages

Type Members

  1. abstract type StyleHint

Abstract Value Members

  1. abstract def attributes(tag: String, styleHint: (TagFormatter.this)#StyleHint, attrs: Seq[(String, String)]): String

    Renders all attributes derived from the style hint and the explicitly provided attributes.

  2. abstract def withChild(element: Element): Rep
    Attributes
    protected
    Definition Classes
    BaseFormatter
  3. abstract def withIndentation(newIndentation: Indentation): Rep
    Attributes
    protected
    Definition Classes
    BaseFormatter

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def attribute(name: String, value: String): String

    Renders the specified attribute including a preceding space character.

  6. def attributes(attrs: Seq[(String, String)]): String

    Renders the specified attributes (passed as name-value tuples), including a preceding space character.

  7. def child(element: Element): String

    Renders the specified element on the current line.

    Renders the specified element on the current line.

    Definition Classes
    BaseFormatter
  8. def childPerLine(elements: Seq[Element]): String

    Renders the specified elements, each of them on a new line using the current level of indentation.

    Renders the specified elements, each of them on a new line using the current level of indentation.

    Definition Classes
    BaseFormatter
  9. def children(elements: Seq[Element]): String

    Renders the specified elements, all on the same line, without any separators.

    Renders the specified elements, all on the same line, without any separators.

    Definition Classes
    BaseFormatter
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  11. def comment(content: String): String

    Renders an HTML/XML comment.

  12. def element(tagName: String, styleHint: (TagFormatter.this)#StyleHint, content: Seq[Element], attrs: (String, String)*): String

    Renders an element with the specified tag name, attributes derived from the style hint and content consisting of the provided child elements, all rendered on the same line.

  13. def emptyElement(tagName: String): String

    Renders an empty element with the specified tag name.

  14. def emptyElement(tagName: String, styleHint: (TagFormatter.this)#StyleHint, attrs: (String, String)*): String

    Renders an empty element with the specified tag name and attributes derived from the style hint.

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def forMessage(message: RuntimeMessage)(whenEnabled: String): String

    Renders the specified string only when the given message has at least the minimum message level defined for this formatter instance.

    Renders the specified string only when the given message has at least the minimum message level defined for this formatter instance.

    Definition Classes
    BaseFormatter
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def indented(f: (Rep) ⇒ String): String

    Invokes the specified render function with a new formatter that is indented one level to the right of this formatter.

    Invokes the specified render function with a new formatter that is indented one level to the right of this formatter.

    Definition Classes
    BaseFormatter
  21. def indentedChildren(elements: Seq[Element]): String

    Renders the specified elements, each of them on a new line with the indentation increased one level to the right.

    Renders the specified elements, each of them on a new line with the indentation increased one level to the right.

    Definition Classes
    BaseFormatter
  22. def indentedElement(tagName: String, styleHint: (TagFormatter.this)#StyleHint, content: Seq[Element], attrs: (String, String)*): String

    Renders an element with the specified tag name, attributes derived from the style hint and indented content consisting of the provided child elements.

  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. val newLine: String

    A newline character followed by whitespace matching the indentation level of this instance.

    A newline character followed by whitespace matching the indentation level of this instance.

    Definition Classes
    BaseFormatter
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. def optAttributes(attrs: (String, Option[String])*): Seq[(String, String)]

    Filters empty values from the provided list of name-value pairs.

  29. def rawElement(tagName: String, styleHint: (TagFormatter.this)#StyleHint, content: String, attrs: (String, String)*): String

    Renders an element with the specified tag name, attributes derived from the style hint and content based on the provided string that is interpreted as already rendered in the target format.

    Renders an element with the specified tag name, attributes derived from the style hint and content based on the provided string that is interpreted as already rendered in the target format. That means that no character escaping will be performed on the provided content.

  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. def text(str: String): String

    Renders the specified string on the same line, with all special XML/HTML characters converted to entities.

  32. def textElement(tagName: String, styleHint: (TagFormatter.this)#StyleHint, txt: String, attrs: (String, String)*): String

    Renders a text element with the specified tag name, attributes derived from the style hint and content based on the provided text content that gets rendered with all special XML/HTML characters converted to entities.

  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def withMinIndentation(minIndent: Int)(f: (Rep) ⇒ String): String

    Invokes the specified render function with a formatter that has at least the specified minimum level of indentation.

    Invokes the specified render function with a formatter that has at least the specified minimum level of indentation. If this instance already has an indentation equal or greater to this value, the current level of indentation will be kept.

    Definition Classes
    BaseFormatter
  38. def withoutIndentation(f: (Rep) ⇒ String): String

    Invokes the specified render function with a new formatter that has all indentation disabled.

    Invokes the specified render function with a new formatter that has all indentation disabled.

    This is usually only required when rendering literal elements or source code where rendered whitespace would be significant.

    Definition Classes
    BaseFormatter

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from BaseFormatter[Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped