Product

io.scalaland.chimney.internal.compiletime.datatypes.ProductTypes.Product
See theProduct companion object
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.

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
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product