Class/Object

s_mach.codetools.macros.ProductTypeHelper

ProductType

Related Docs: object ProductType | package ProductTypeHelper

Permalink

case class ProductType(_type: scala.reflect.macros.blackbox.Context.Type, oomField: List[Field], applyMethod: scala.reflect.macros.Universe.MethodSymbol, unapplyMethod: scala.reflect.macros.Universe.MethodSymbol, allFieldsAreMembers: Boolean) extends Product with Serializable

A case class that represents the fields for a product type.

_type

the product type

oomField

the fields of the product type (computed from the arguments in the apply method)

applyMethod

the matched apply method

unapplyMethod

the matched unapply method

allFieldsAreMembers

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)

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProductType
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ProductType(_type: scala.reflect.macros.blackbox.Context.Type, oomField: List[Field], applyMethod: scala.reflect.macros.Universe.MethodSymbol, unapplyMethod: scala.reflect.macros.Universe.MethodSymbol, allFieldsAreMembers: Boolean)

    Permalink

    _type

    the product type

    oomField

    the fields of the product type (computed from the arguments in the apply method)

    applyMethod

    the matched apply method

    unapplyMethod

    the matched unapply method

    allFieldsAreMembers

    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)

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val _type: scala.reflect.macros.blackbox.Context.Type

    Permalink

    the product type

  5. val allFieldsAreMembers: Boolean

    Permalink

    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)

  6. val applyMethod: scala.reflect.macros.Universe.MethodSymbol

    Permalink

    the matched apply method

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val companion: scala.reflect.macros.blackbox.Context.Tree

    Permalink

    The Tree necessary for the type's companion object

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def mkFieldValsTree(value: scala.reflect.macros.blackbox.Context.Tree, mkValName: (String) ⇒ String = s => s, tupleName: ⇒ String = "__decomposedValue$1"): Seq[scala.reflect.macros.blackbox.Context.Tree]

    Permalink

    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 """

    value

    the tree for the value

    mkValName

    a function that accepts the field name and returns the name of the val

    tupleName

    the val name of the tuple (used only when allFieldsAreMembers is false)

    returns

    a Tree with a val for each field decomposed from the value

  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. val oomField: List[Field]

    Permalink

    the fields of the product type (computed from the arguments in the apply method)

  19. def print: String

    Permalink
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. val unapplyMethod: scala.reflect.macros.Universe.MethodSymbol

    Permalink

    the matched unapply method

  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped