s_mach.codetools.macros.ProductTypeHelper
the product type
the fields of the product type (computed from the arguments in the apply method)
the matched apply method
the matched unapply method
TRUE if all fields correspond to a public no arg member method with the same name and type in the product type (e.g. this is true for all case classes and tuple types)
the product type
TRUE if all fields correspond to a public no arg member method with the same name and type in the product type (e.g.
TRUE if all fields correspond to a public no arg member method with the same name and type in the product type (e.g. this is true for all case classes and tuple types)
the matched apply method
The Tree necessary for the type's companion object
Make the Tree necessary to decompose a value of a product type into the individual fields.
Make the Tree necessary to decompose a value of a product type into the individual fields. If all product type fields are members of the type then the fields are accessed directly, otherwise the unapply method is used. Example1: case class Person1(name: String, age: Int) q""" val name = value.name val age = value.int """ Example2: class Person2 { ... } object Person2 { def apply(name: String, age: Int) : Person2 = ??? def unapply(p:Person2) : Option[(String,Int)] = ??? } q""" val (name,age) = Person2.unapply(value).get """
the tree for the value
a function that accepts the field name and returns the name of the val
the val name of the tuple (used only when allFieldsAreMembers is false)
a Tree with a val for each field decomposed from the value
the fields of the product type (computed from the arguments in the apply method)
the matched unapply method
A case class that represents the fields for a product type.
the product type
the fields of the product type (computed from the arguments in the apply method)
the matched apply method
the matched unapply method
TRUE if all fields correspond to a public no arg member method with the same name and type in the product type (e.g. this is true for all case classes and tuple types)