Object HierarchicalRenderer provides a collection of implicit instances and type definitions for the UntaggedHierarchicalRenderer trait, allowing for hierarchical serialization of various primitive and common types such as String, Boolean, Int, Long, BigInt, Double, and LocalDate.
These implicit objects define how to render instances of their respective types into a hierarchical structure (Node) by extending the generic UntaggedHierarchicalRenderer which implements the HierarchicalRenderer interface.
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
HierarchicalRenderer.type
Members list
Type members
Classlikes
Attributes
- Companion
- trait
- Supertypes
-
trait UntaggedHierarchicalRenderer[BigInt]trait HierarchicalRenderer[BigInt]class Objecttrait Matchableclass AnyShow all
- Self type
A type class responsible for rendering instances of BigInt in a hierarchical structure without additional tagging or specific rendering formats.
A type class responsible for rendering instances of BigInt in a hierarchical structure without additional tagging or specific rendering formats.
This trait extends the functionality provided by UntaggedHierarchicalRenderer, specifically for the type BigInt. It inherits the capability of rendering hierarchical structures while allowing attributes for customization.
Since it extends UntaggedHierarchicalRenderer, it provides a render method to convert a BigInt instance into a Node representation while factoring in additional attributes and style information predefined in UntaggedHierarchicalRenderer.
Example usage:
implicit object BigIntHierarchicalRenderer extends BigIntHierarchicalRenderer
val bigIntInstance: BigInt = BigInt(12345)
val renderedNode: Node = BigIntHierarchicalRenderer.render(bigIntInstance, Map("attr1" -> "value1"))
println(renderedNode) // Node(style, Some("12345"), Map("attr1" -> "value1"))
Attributes
- See also
-
UntaggedHierarchicalRenderer for more details regarding the rendering framework.
- Companion
- object
- Supertypes
-
trait UntaggedHierarchicalRenderer[BigInt]trait HierarchicalRenderer[BigInt]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object BigIntHierarchicalRenderer
An implicit object for rendering Boolean values in a hierarchical structure.
An implicit object for rendering Boolean values in a hierarchical structure.
BooleanHierarchicalRenderer is an instance of the BooleanHierarchicalRenderer trait, which provides support for rendering Boolean values by adhering to the UntaggedHierarchicalRenderer contract. It allows for consistent and structured formatting of Boolean data to fit into a hierarchical rendering context.
This implicit instance can be automatically utilized wherever a BooleanHierarchicalRenderer is required, making it easier to work with Boolean rendering across hierarchical structures without the need for explicitly defining renderers.
Attributes
- Companion
- trait
- Supertypes
-
trait UntaggedHierarchicalRenderer[Boolean]trait HierarchicalRenderer[Boolean]class Objecttrait Matchableclass AnyShow all
- Self type
Trait BooleanHierarchicalRenderer extends the UntaggedHierarchicalRenderer for handling Boolean types.
Trait BooleanHierarchicalRenderer extends the UntaggedHierarchicalRenderer for handling Boolean types.
This trait provides rendering capabilities for Boolean values, which involve rendering them into a structured format while potentially applying additional attributes or styles. It serves as a type-specific implementation for rendering Boolean values in a hierarchical model.
The style associated with the rendering can be customized, and attributes can be passed to the render method for finer control over the rendered output.
==Type Parameters== None, as this is specifically defined for the Boolean type.
==Inheritance== This trait inherits from UntaggedHierarchicalRenderer, leveraging the base rendering functionality provided by that trait while specializing it for Boolean types.
==Usage== This trait is typically used where hierarchical rendering of Boolean values is required, such as in contexts involving nested or tree-like data structures.
An implicit instance of this trait is available, enabling seamless use in generic code that requires an implicit renderer for type Boolean.
Attributes
- See also
-
UntaggedHierarchicalRenderer
HierarchicalRenderer
- Companion
- object
- Supertypes
-
trait UntaggedHierarchicalRenderer[Boolean]trait HierarchicalRenderer[Boolean]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object BooleanHierarchicalRenderer
Implicit object providing a default implementation of DoubleHierarchicalRenderer.
Implicit object providing a default implementation of DoubleHierarchicalRenderer.
The DoubleHierarchicalRenderer is an implicit, singleton object that serves as a type class instance for rendering Double values in a hierarchical structure. It extends the DoubleHierarchicalRenderer trait, which itself extends UntaggedHierarchicalRenderer[Double]. This ensures that the object integrates into systems utilizing the HierarchicalRenderer type class framework.
This implicit object allows seamless rendering of Double values when a hierarchical rendering type class is required in the context of HierarchicalRenderer.
Attributes
- Companion
- trait
- Supertypes
-
trait UntaggedHierarchicalRenderer[Double]trait HierarchicalRenderer[Double]class Objecttrait Matchableclass AnyShow all
- Self type
Trait DoubleHierarchicalRenderer extends the UntaggedHierarchicalRenderer to provide rendering capabilities specifically for objects of type Double in a hierarchical structure.
Trait DoubleHierarchicalRenderer extends the UntaggedHierarchicalRenderer to provide rendering capabilities specifically for objects of type Double in a hierarchical structure.
This trait is used to define how instances of Double can be represented in a hierarchical format, inheriting the basic behavior and methods from the UntaggedHierarchicalRenderer type class.
Key Features:
- Automatic support for rendering
Doubleobjects in a hierarchical layout. - Includes rendering functionality inherited from
UntaggedHierarchicalRenderer, such as therendermethod. - Provides a default styling structure through the
styleproperty inherited from the parent trait.
This trait simplifies the customization and usage of hierarchical renderers specific to the Double type and can be utilized as part of a rendering pipeline where structured data representations are needed.
Attributes
- See also
-
UntaggedHierarchicalRenderer for more details on the base functionality.
- Companion
- object
- Supertypes
-
trait UntaggedHierarchicalRenderer[Double]trait HierarchicalRenderer[Double]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object DoubleHierarchicalRenderer
Implicit object IntHierarchicalRenderer provides a default implementation of the IntHierarchicalRenderer trait, which extends the UntaggedHierarchicalRenderer type class for the Int type, enabling hierarchical rendering operations for Int values. This object acts as a companion and offers concrete behavior for rendering integers hierarchically.
Implicit object IntHierarchicalRenderer provides a default implementation of the IntHierarchicalRenderer trait, which extends the UntaggedHierarchicalRenderer type class for the Int type, enabling hierarchical rendering operations for Int values. This object acts as a companion and offers concrete behavior for rendering integers hierarchically.
The purpose of this renderer is to support type-safe and composable rendering of Int values in contexts where hierarchical data needs to be processed. The implementation is expected to define how integers are transformed or rendered in a hierarchical structure.
Usage: By being an implicit object, IntHierarchicalRenderer is automatically available wherever an IntHierarchicalRenderer instance is required implicitly. Users can this behavior by creating their own instances if a customized implementation is needed.
Example:
// Assuming a hierarchical rendering context
val result = someHierarchicalRenderingMethod(42) // Uses IntHierarchicalRenderer implicitly
Attributes
- Companion
- trait
- Supertypes
-
trait IntHierarchicalRenderertrait UntaggedHierarchicalRenderer[Int]trait HierarchicalRenderer[Int]class Objecttrait Matchableclass AnyShow all
- Self type
A trait for rendering instances of type Int in a hierarchical structure, extending the UntaggedHierarchicalRenderer functionality tailored for the Int type.
A trait for rendering instances of type Int in a hierarchical structure, extending the UntaggedHierarchicalRenderer functionality tailored for the Int type.
This trait provides a framework for rendering integers with an associated set of attributes, potentially styled through the style property inherited from its parent trait.
The IntHierarchicalRenderer can be utilized as a part of a broader rendering pipeline where structured (hierarchical) representation of data is required. This trait acts as the specific renderer for Int values, leveraging mechanisms defined in its supertype.
Attributes
- See also
-
UntaggedHierarchicalRenderer for further details around the rendering process and expected behavior of methods like
render. - Companion
- object
- Supertypes
-
trait UntaggedHierarchicalRenderer[Int]trait HierarchicalRenderer[Int]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object IntHierarchicalRenderer
Attributes
- Companion
- trait
- Supertypes
-
trait UntaggedHierarchicalRenderer[LocalDate]trait HierarchicalRenderer[LocalDate]class Objecttrait Matchableclass AnyShow all
- Self type
Trait LocalDateHierarchicalRenderer is a specialized implementation of the UntaggedHierarchicalRenderer for rendering instances of LocalDate in a hierarchical structured format. It provides a mechanism to render LocalDate objects as nodes with additional attributes.
Trait LocalDateHierarchicalRenderer is a specialized implementation of the UntaggedHierarchicalRenderer for rendering instances of LocalDate in a hierarchical structured format. It provides a mechanism to render LocalDate objects as nodes with additional attributes.
This trait inherits the rendering capabilities from UntaggedHierarchicalRenderer[LocalDate], which is designed for rendering objects of a specific type while supporting custom attributes and style.
Example usage:
implicit object MyLocalDateRenderer extends LocalDateHierarchicalRenderer
val renderedNode: Node = MyLocalDateRenderer.render(LocalDate.now, Map("key" -> "value"))
Attributes
- See also
-
UntaggedHierarchicalRenderer for the base trait and its methods.
- Companion
- object
- Supertypes
-
trait UntaggedHierarchicalRenderer[LocalDate]trait HierarchicalRenderer[LocalDate]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Implicit object for rendering Long values in a hierarchical manner.
Implicit object for rendering Long values in a hierarchical manner.
This object provides an implicit instance of LongHierarchicalRenderer trait to render Long type values in a structured, hierarchical format. The specific rendering behavior is defined within the LongHierarchicalRenderer trait.
Usage: Implicitly used in contexts where a Long type value needs to be serialized or represented hierarchically.
Attributes
- Companion
- trait
- Supertypes
-
trait LongHierarchicalRenderertrait UntaggedHierarchicalRenderer[Long]trait HierarchicalRenderer[Long]class Objecttrait Matchableclass AnyShow all
- Self type
Trait LongHierarchicalRenderer extends UntaggedHierarchicalRenderer specifically for rendering hierarchical structures of type Long. It provides a framework to transform instances of Long into a node-based hierarchical representation, leveraging the untagged style rendering provided by the parent trait.
Trait LongHierarchicalRenderer extends UntaggedHierarchicalRenderer specifically for rendering hierarchical structures of type Long. It provides a framework to transform instances of Long into a node-based hierarchical representation, leveraging the untagged style rendering provided by the parent trait.
This trait does not define any additional members or behavior itself but inherits from UntaggedHierarchicalRenderer, using Long as the predefined type parameter.
Attributes
- See also
-
UntaggedHierarchicalRenderer
- Companion
- object
- Supertypes
-
trait UntaggedHierarchicalRenderer[Long]trait HierarchicalRenderer[Long]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object LongHierarchicalRenderer
Implicit object for rendering hierarchical structures as strings.
Implicit object for rendering hierarchical structures as strings.
The StringHierarchicalRenderer provides an implicit instance of the StringHierarchicalRenderer type class, allowing hierarchical data structures to be rendered into a string format. This is useful for cases where hierarchical data needs to be displayed, logged, or processed in textual form.
A StringHierarchicalRenderer is a subtype of UntaggedHierarchicalRenderer[String], enabling the rendering of hierarchy data without requiring specific type tags.
Usage: By importing this implicit object into scope, you can provide a default mechanism for string-based hierarchical rendering for types supporting the StringHierarchicalRenderer trait.
Attributes
- Companion
- trait
- Supertypes
-
trait UntaggedHierarchicalRenderer[String]trait HierarchicalRenderer[String]class Objecttrait Matchableclass AnyShow all
- Self type
A type class that provides functionality to render hierarchical data as strings.
A type class that provides functionality to render hierarchical data as strings.
The StringHierarchicalRenderer trait extends the UntaggedHierarchicalRenderer specifically for rendering data where the rendered output is of type String. This trait is the foundation for constructing string-based hierarchical renderings within a rendering framework.
It inherits the capabilities from UntaggedHierarchicalRenderer[String], where:
- It allows objects of type
Tto be systematically converted into a string format with optional attributes that define characteristics of rendering. - It contains a default
styleattribute that can be used when rendering (defaults to an empty string).
By using StringHierarchicalRenderer, developers can define ways to represent data objects hierarchically in string form, while benefiting from shared behavior in the UntaggedHierarchicalRenderer parent trait.
Attributes
- See also
-
UntaggedHierarchicalRenderer
HierarchicalRenderer
- Companion
- object
- Supertypes
-
trait UntaggedHierarchicalRenderer[String]trait HierarchicalRenderer[String]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object StringHierarchicalRenderer
Value members
Concrete methods
Method to derive a HierarchicalRenderer for a case class T, as a node with the given style whose children are its fields, each rendered by its own HierarchicalRenderer, with a "name" attribute giving the field's name. This replaces the renderer1 ... renderer13 methods of HierarchicalRenderers in 1.x.
Method to derive a HierarchicalRenderer for a case class T, as a node with the given style whose children are its fields, each rendered by its own HierarchicalRenderer, with a "name" attribute giving the field's name. This replaces the renderer1 ... renderer13 methods of HierarchicalRenderers in 1.x.
NOTE: because it takes a style, this is used as given HierarchicalRenderer[T] = HierarchicalRenderer.derived[T]("style"), not with derives. Each field's type must have a HierarchicalRenderer of its own.
NOTE: for a case class defined inside a method, see the NOTE on CellParser.derived.
Type parameters
- T
-
a case class.
Value parameters
- attrs
-
the base attributes of the node for a T (defaults to none).
- m
-
the Mirror of T.
- style
-
the style of the node for a T.
Attributes
- Returns
-
a HierarchicalRenderer[T].
Givens
Givens
An implicit object for rendering Boolean values in a hierarchical structure.
An implicit object for rendering Boolean values in a hierarchical structure.
BooleanHierarchicalRenderer is an instance of the BooleanHierarchicalRenderer trait, which provides support for rendering Boolean values by adhering to the UntaggedHierarchicalRenderer contract. It allows for consistent and structured formatting of Boolean data to fit into a hierarchical rendering context.
This implicit instance can be automatically utilized wherever a BooleanHierarchicalRenderer is required, making it easier to work with Boolean rendering across hierarchical structures without the need for explicitly defining renderers.
Attributes
Implicit object providing a default implementation of DoubleHierarchicalRenderer.
Implicit object providing a default implementation of DoubleHierarchicalRenderer.
The DoubleHierarchicalRenderer is an implicit, singleton object that serves as a type class instance for rendering Double values in a hierarchical structure. It extends the DoubleHierarchicalRenderer trait, which itself extends UntaggedHierarchicalRenderer[Double]. This ensures that the object integrates into systems utilizing the HierarchicalRenderer type class framework.
This implicit object allows seamless rendering of Double values when a hierarchical rendering type class is required in the context of HierarchicalRenderer.
Attributes
Implicit object IntHierarchicalRenderer provides a default implementation of the IntHierarchicalRenderer trait, which extends the UntaggedHierarchicalRenderer type class for the Int type, enabling hierarchical rendering operations for Int values. This object acts as a companion and offers concrete behavior for rendering integers hierarchically.
Implicit object IntHierarchicalRenderer provides a default implementation of the IntHierarchicalRenderer trait, which extends the UntaggedHierarchicalRenderer type class for the Int type, enabling hierarchical rendering operations for Int values. This object acts as a companion and offers concrete behavior for rendering integers hierarchically.
The purpose of this renderer is to support type-safe and composable rendering of Int values in contexts where hierarchical data needs to be processed. The implementation is expected to define how integers are transformed or rendered in a hierarchical structure.
Usage: By being an implicit object, IntHierarchicalRenderer is automatically available wherever an IntHierarchicalRenderer instance is required implicitly. Users can this behavior by creating their own instances if a customized implementation is needed.
Example:
// Assuming a hierarchical rendering context
val result = someHierarchicalRenderingMethod(42) // Uses IntHierarchicalRenderer implicitly
Attributes
Implicit object for rendering Long values in a hierarchical manner.
Implicit object for rendering Long values in a hierarchical manner.
This object provides an implicit instance of LongHierarchicalRenderer trait to render Long type values in a structured, hierarchical format. The specific rendering behavior is defined within the LongHierarchicalRenderer trait.
Usage: Implicitly used in contexts where a Long type value needs to be serialized or represented hierarchically.
Attributes
Implicit object for rendering hierarchical structures as strings.
Implicit object for rendering hierarchical structures as strings.
The StringHierarchicalRenderer provides an implicit instance of the StringHierarchicalRenderer type class, allowing hierarchical data structures to be rendered into a string format. This is useful for cases where hierarchical data needs to be displayed, logged, or processed in textual form.
A StringHierarchicalRenderer is a subtype of UntaggedHierarchicalRenderer[String], enabling the rendering of hierarchy data without requiring specific type tags.
Usage: By importing this implicit object into scope, you can provide a default mechanism for string-based hierarchical rendering for types supporting the StringHierarchicalRenderer trait.