Packages

trait MacroCodec[T] extends Codec[T]

T

the case class type for the codec

Since

2.0

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MacroCodec
  2. Codec
  3. Decoder
  4. Encoder
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val caseClassesMap: Map[String, Class[_]]

    Creates a Map[String, Class[_]] mapping the case class name and the type.

  2. abstract val classFieldTypeArgsMap: Map[String, Map[String, List[Class[_]]]]

    A nested map of case class name to a Map of the given field names and a list of the field types.

  3. abstract val classToCaseClassMap: Map[Class[_], Boolean]

    Creates a Map[Class[_], Boolean] mapping field types to a boolean representing if they are a case class.

  4. abstract val codecRegistry: CodecRegistry

    The CodecRegistry for use with the codec

  5. abstract val encoderClass: Class[T]

    The case class type for the codec

  6. abstract def getInstance(className: String, fieldsData: Map[String, Any]): T

    Creates a new instance of the case class with the provided data

    Creates a new instance of the case class with the provided data

    className

    the name of the class to be instantiated

    fieldsData

    the Map of data for the class

    returns

    the new instance of the class

  7. abstract def writeCaseClassData(className: String, writer: BsonWriter, value: T, encoderContext: EncoderContext): Unit

    The method that writes the data for the case class

    The method that writes the data for the case class

    className

    the name of the current case class being written

    writer

    the BsonWriter

    value

    the value to the case class

    encoderContext

    the EncoderContext

Concrete Value Members

  1. lazy val caseClassesMapInv: Map[Class[_], String]
  2. val classFieldName: String

    The field used to save the class name when saving sealed case classes.

  3. def decode(reader: BsonReader, decoderContext: DecoderContext): T
    Definition Classes
    MacroCodec → Decoder
  4. def encode(writer: BsonWriter, value: T, encoderContext: EncoderContext): Unit
    Definition Classes
    MacroCodec → Encoder
  5. def getEncoderClass(): Class[T]
    Definition Classes
    MacroCodec → Encoder
  6. lazy val hasClassFieldName: Boolean