constructs a new instance of the case class type
constructs a new instance of the case class type
This method will be implemented by the Magnolia macro to make it possible to construct instances of case classes generically in user code, that is, without knowing their type concretely.
To construct a new case class instance, the method takes a lambda which defines how each parameter in the new case class should be constructed. See the Param class for more information on constructing parameter values from a Param instance.
lambda for converting a generic Param into the value to be used for this parameter in the construction of a new instance of the case class
a new instance of the case class
true only if this represents a case object rather than a case class
a sequence of Param objects representing all of the parameters in the case class
a sequence of Param objects representing all of the parameters in the case class
For efficiency, this sequence is implemented by an Array
, but upcast to a
scala.collection.Seq to hide the mutable collection API.
the name of the case class
represents a case class or case object and the context required to construct a new typeclass instance corresponding to it
Instances of CaseClass provide access to all of the parameters of the case class, the full name of the case class type, and a boolean to determine whether the type is a case class or case object.
type constructor for the typeclass being derived
generic type of this parameter