ProductTypes

io.scalaland.chimney.internal.compiletime.datatypes.ProductTypes
trait ProductTypes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type

Members list

Type members

Classlikes

final protected case class Product[A](extraction: Extraction[A], construction: Constructor[A])

Describes all types which could be considered products in a very loose way.

Describes all types which could be considered products in a very loose way.

For type to be considered "product" it has to be:

  • non abstract
  • have a public (primary) constructor

If it's a "product" then we are able to provide both a way to construct it as well as a way to extract its properties. This is rather unrestricted since:

  • our "constructor" allows passing arguments to Java Bean setters
  • our properties include: defs without arguments, Java Bean getters and it's the code using the extractors and constructors that should check the type of getter/constructor argument.

In case we don't need a "product" per se, but rather any instantiable type to instantiate or any type to obtain its methods, we can use unapply from Extraction or Construction.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
protected object Product

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Product.type
implicit class ProductTypeOps[A](tpe: Type[A])

Attributes

Supertypes
class Object
trait Matchable
class Any
protected trait ProductTypesModule

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ProductType.type
Self type

Value members

Abstract fields

Implicits

Implicits

final implicit def ProductTypeOps[A](tpe: <none>[A]): ProductTypeOps[A]