Object containing various Renderer instances and utility methods for rendering objects into string representations with optional attributes and specific formatting rules.
Attributes
Members list
Value members
Concrete methods
Provides a Renderer instance for rendering enum-like attributes. This renderer converts the input type T into a string representation and processes it as an attribute using the rendering state information.
Provides a Renderer instance for rendering enum-like attributes. This renderer converts the input type T into a string representation and processes it as an attribute using the rendering state information.
Type parameters
- T
-
the type parameter for the object being rendered, representing an enum-like type.
Attributes
- Returns
-
a
Renderer[T]instance for rendering enum attributes.
Provides a Renderer instance for rendering objects of type T. This method converts the input object into a string representation using its toString method.
Provides a Renderer instance for rendering objects of type T. This method converts the input object into a string representation using its toString method.
Type parameters
- T
-
the type of the object to render.
Attributes
- Returns
-
a
Renderer[T]that processes the object and renders its string representation.
Renders any given object into a string representation, optionally incorporating a name as part of the rendering. The rendering is performed using the renderAttribute method, which formats the output as either name="value" or simply value if no name is provided.
Renders any given object into a string representation, optionally incorporating a name as part of the rendering. The rendering is performed using the renderAttribute method, which formats the output as either name="value" or simply value if no name is provided.
Value parameters
- maybeName
-
an optional string representing the name to be prefixed in the rendered output
- t
-
the object to be rendered, converted to its string representation using
toString
Attributes
- Returns
-
a
Try[String]containing the rendered representation or an exception if rendering fails
Concrete fields
Implicits
Implicits
Implicit Renderer instance for the CharSequence type.
Implicit Renderer instance for the CharSequence type.
This renderer is responsible for converting a CharSequence into its string representation, based on the given format and rendering state. It handles two specific cases:
- If the input
CharSequenceis of typeCDATAand the format is_XML, it invokestoXMLto generate the appropriate XML representation. - For all other
CharSequenceinputs, it uses thescrubmethod to sanitize the input and then callsrenderAttributeto produce the final string representation.
Note: Additional handling may be needed to convert all other CharSequence inputs into CDATA if required.
Attributes
Implicit Renderer instance for java.net.URI, the counterpart to Extractor.uriExtractor.
Implicit Renderer instance for java.net.URI, the counterpart to Extractor.uriExtractor.