case class TextFormatter(renderChild: (TextFormatter, Element) => String, currentElement: Element, parents: List[Element], indentation: Indentation) extends BaseFormatter[TextFormatter] with Product with Serializable
API for renderers that produce text output.
- 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
- indentation
the indentation mechanism for this formatter
- Alphabetic
- By Inheritance
- TextFormatter
- Serializable
- Product
- Equals
- BaseFormatter
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new TextFormatter(renderChild: (TextFormatter, Element) => String, currentElement: Element, parents: List[Element], indentation: Indentation)
- 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
- indentation
the indentation mechanism for this formatter
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def child(element: Element): String
Renders the specified element on the current line.
Renders the specified element on the current line.
- Definition Classes
- BaseFormatter
- 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
- 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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val currentElement: Element
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val indentation: Indentation
- def indented(f: (TextFormatter) => 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
- 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
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val parents: List[Element]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val renderChild: (TextFormatter, Element) => String
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withChild(element: Element): TextFormatter
- Attributes
- protected
- Definition Classes
- TextFormatter → BaseFormatter
- def withIndentation(newIndentation: Indentation): TextFormatter
- Attributes
- protected
- Definition Classes
- TextFormatter → BaseFormatter
- def withMinIndentation(minIndent: Int)(f: (TextFormatter) => 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
- def withoutIndentation(f: (TextFormatter) => 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