records.RecordConversions

ConversionMacros

class ConversionMacros[C <: Context] extends RecordMacros[C] with Internal210

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ConversionMacros
  2. RecordMacros
  3. Internal210
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConversionMacros(c: C)

Type Members

  1. implicit class RichContext extends AnyRef

    Definition Classes
    Internal210
  2. implicit class RichFlag extends AnyRef

    Definition Classes
    Internal210
  3. implicit class RichMethodSymbol extends AnyRef

    Definition Classes
    Internal210
  4. implicit class RichSymbol extends AnyRef

    Definition Classes
    Internal210
  5. type Schema = Seq[(String, scala.reflect.macros.Universe.Type)]

    Definition Classes
    RecordMacros

Value Members

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

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

    Definition Classes
    AnyRef → Any
  3. object ->

    Definition Classes
    RecordMacros
  4. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  5. def accessData(receiver: scala.reflect.macros.Universe.Tree, fieldName: String, tpe: scala.reflect.macros.Universe.Type): scala.reflect.macros.Universe.Tree

    Generate a specialized data access on a record

    Generate a specialized data access on a record

    Definition Classes
    RecordMacros
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val c: C

    Definition Classes
    ConversionMacrosRecordMacrosInternal210
  8. def caseClassFields(ccType: scala.reflect.macros.Universe.Type): List[(String, scala.reflect.macros.Universe.Type)]

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def convertRecordMaterializer(fromType: scala.reflect.macros.Universe.Type, toType: scala.reflect.macros.Universe.Type, originalType: scala.reflect.macros.Universe.Type, path: List[String]): scala.reflect.macros.Universe.Tree

  11. def convertRecordMaterializer(fromType: scala.reflect.macros.Universe.Type, toType: scala.reflect.macros.Universe.Type, path: List[String] = Nil): scala.reflect.macros.Universe.Tree

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

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def findConvertRecordCandidate[From <: Rec, To](implicit arg0: C.WeakTypeTag[From], arg1: C.WeakTypeTag[To]): C.Expr[ConvertRecord[From, To]]

  16. def genDataAny(schema: Schema): scala.reflect.macros.Universe.Tree

    Generate _​_dataAny member

    Generate _​_dataAny member

    Definition Classes
    RecordMacros
  17. def genDataExists(schema: Schema): scala.reflect.macros.Universe.Tree

    Generate _​_dataExists member

    Generate _​_dataExists member

    Definition Classes
    RecordMacros
  18. def genEquals(schema: Schema): scala.reflect.macros.Universe.Tree

    Generate the equals method for Records.

    Generate the equals method for Records. Two records are equal iff:

    • They have the same number of fields
    • Their fields have the same names
    • Values of corresponding fields compare equal
    Definition Classes
    RecordMacros
  19. def genHashCode(schema: Schema): scala.reflect.macros.Universe.Tree

    Generate the hashCode method of a record.

    Generate the hashCode method of a record. The hasCode is an bitwise xor of the hashCodes of the field names (this one is calculated at compile time) and the hashCodes of the field values

    Definition Classes
    RecordMacros
  20. def genLookup(nameTree: scala.reflect.macros.Universe.Tree, data: Map[String, scala.reflect.macros.Universe.Tree], default: Option[scala.reflect.macros.Universe.Tree] = None, mayCache: Boolean = true): scala.reflect.macros.Universe.Tree

    Generate a lookup amongst the keys in data and map to the tree values.

    Generate a lookup amongst the keys in data and map to the tree values. This is like an exhaustive pattern match on the strings, but may be implemented more efficiently. If default is None, it is assumed that nameTree evaluates to one of the keys of data. Otherwise the default tree is used if a key doesn't exist. If mayCache is true, the implementation might decide to store the evaluated trees somewhere (at runtime). Otherwise, the trees will be evaluated each time the resulting tree is evaluated.

    Definition Classes
    RecordMacros
  21. def genRecord(schema: Schema, ancestors: Seq[scala.reflect.macros.Universe.Ident], impl: Seq[scala.reflect.macros.Universe.Tree]): scala.reflect.macros.Universe.Tree

    Generalized record.

    Generalized record. Implementation is totally left to the caller.

    schema

    List of (field name, field type) tuples

    ancestors

    Traits that are mixed into the resulting Rec (e.g. Serializable). Make sure the idents are fully qualified.

    impl

    However you want to implement the _​_data interface.

    Definition Classes
    RecordMacros
  22. def genRecordField(name: String, tpe: scala.reflect.macros.Universe.Type): scala.reflect.macros.Universe.Tree

    Create a tree for a 'def' of a record field.

    Create a tree for a 'def' of a record field. If a type of the field is yet another record, it will be a class type of the $​anon class (created as part of genRecord), rather than a pure RefinedType. Therefore we have to recreate it and provide an appropriate type to the macro call.

    Definition Classes
    RecordMacros
  23. def genToString(schema: Schema): scala.reflect.macros.Universe.Tree

    Generate the toString method of a record.

    Generate the toString method of a record. The resulting toString method will generate strings of the form:

    Rec { fieldName1 = fieldValue1, fieldName2 = fieldValue2, ... }
    Definition Classes
    RecordMacros
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def hashCode(): Int

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

    Definition Classes
    Any
  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  30. val rImplMods: scala.reflect.macros.Universe.Modifiers

    Attributes
    protected
    Definition Classes
    RecordMacros
  31. def record(schema: Schema)(ancestors: scala.reflect.macros.Universe.Ident*)(fields: scala.reflect.macros.Universe.Tree*)(dataImpl: scala.reflect.macros.Universe.Tree): scala.reflect.macros.Universe.Tree

    Create a Record

    Create a Record

    This creates a simple record that implements _​_data. As a consequence it needs to box when used with primitive types.

    schema

    List of (field name, field type) tuples

    ancestors

    Traits that are mixed into the resulting Rec (e.g. Serializable). Make sure the idents are fully qualified.

    fields

    Additional members/fields of the resulting Rec (recommended for private data fields)

    dataImpl

    Implementation of the _​_data method. Should use the parameter fieldName of type String and the type parameter T and return a value of type T return a value of a corresponding type.

    Definition Classes
    RecordMacros
  32. def recordApply(v: Seq[C.Expr[(String, Any)]]): C.Expr[Rec]

    Macro that implements Rec.apply.

    Macro that implements Rec.apply. You probably won't need this.

    Definition Classes
    RecordMacros
  33. def recordFields(recType: scala.reflect.macros.Universe.Type): Iterable[(String, scala.reflect.macros.Universe.Type)]

  34. def specializedRecord(schema: Schema)(ancestors: scala.reflect.macros.Universe.Ident*)(fields: scala.reflect.macros.Universe.Tree*)(objectDataImpl: scala.reflect.macros.Universe.Tree)(dataImpl: PartialFunction[scala.reflect.macros.Universe.Type, scala.reflect.macros.Universe.Tree]): scala.reflect.macros.Universe.Tree

    Create a specialized record

    Create a specialized record

    By providing implementations for all or some primitive types, boxing can be avoided.

    schema

    List of (field name, field type) tuples

    ancestors

    Traits that are mixed into the resulting Rec (e.g. Serializable). Make sure the idents are fully qualified.

    fields

    Additional members/fields of the resulting Rec (recommended for private data fields)

    objectDataImpl

    Implementation of the _​_dataObj method. Should use the parameter fieldName of type String and the type parameter T and return a value of type T

    dataImpl

    Partial function giving the implementations of the _​_data* methods. If it is not defined for some of the _​_data* methods, ??? will be used instead. Should use the parameter fieldName of type String and return a value of a corresponding type. The partial function will be called exactly once with each value in specializedTypes.

    Definition Classes
    RecordMacros
  35. val specializedTypes: Set[scala.reflect.macros.Universe.Type]

    Set of types for which the _​_data* members are specialized

    Set of types for which the _​_data* members are specialized

    Definition Classes
    RecordMacros
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  37. val synthMod: scala.reflect.macros.Universe.Modifiers

    Attributes
    protected
    Definition Classes
    RecordMacros
  38. def toString(): String

    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RecordMacros[C]

Inherited from Internal210

Inherited from AnyRef

Inherited from Any

Ungrouped