WellKnownTypeMappings

nscn.polaris2.protoc.codegen.WellKnownTypeMappings

The Well-Known Types that map to a standard library type by default.

The base of each mapping is protobuf-java's own class, so RAW needs no generated message and the mapped form needs no second implementation of the semantics.

This table is the generator's half of a pair; the other half is nscn.polaris2.protoc.runtime.WellKnownTypes, which the generator cannot link against because the two modules are on different Scala versions. The e2e tests compile generated code against the real runtime, which is what keeps the two in step.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Mapping(javaClass: String, scalaType: String, mapper: String)

Value parameters

javaClass

the protobuf-java class, which is also the RAW mapping's Scala type

mapper

the TypeMapper between the two

scalaType

what the field's type becomes under the STDLIB mapping

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def isWellKnown(protoFullName: String): Boolean

Whether a message is one of protobuf's own, whatever mapping is in force.

Whether a message is one of protobuf's own, whatever mapping is in force.

Attributes

Concrete fields

val byProtoName: Map[String, Mapping]