/* Ċ Ġ* ĠUnless Ġexplicitly Ġstated Ġotherwise Ġall Ġfiles Ġin Ġthis Ġrepository Ġare Ġlicensed Ġunder Ġthe ĠApache ĠLicense ĠVersion Ġ 2 . 0 . Ċ Ġ* ĠThis Ġproduct Ġincludes Ġsoftware Ġdeveloped Ġat ĠDat adog Ġ( https :// www . datadog hq . com /). Ċ Ġ* ĠCopyright Ġ 2 0 1 6 - Present ĠDat adog , ĠInc . Ċ Ġ*/ Ċ Ċ package Ġcom . datadog . android . tracing . internal . domain . event Ċ Ċ import Ġcom . datadog . android . core . internal . Mapper Ċ import Ġcom . datadog . android . core . internal . persistence . Serializer Ċ import Ġcom . datadog . android . event . Event Mapper Ċ import Ġcom . datadog . android . tracing . model . Span Event Ċ import Ġcom . datadog . op entr acing . DD Span Ċ Ċ internal Ġclass ĠSpan Mapper Serializer ( ĊĠĠĠ Ġprivate Ġval Ġlegacy Mapper : ĠMapper < DD Span , ĠSpan Event >, ĊĠĠĠ Ġprivate Ġval Ġspan Event Mapper : ĠEvent Mapper < Span Event >, ĊĠĠĠ Ġprivate Ġval Ġspan Serializer : ĠSerializer < Span Event > Ċ ) Ġ: ĠSerializer < DD Span > Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġserialize ( model : ĠDD Span ): ĠString ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġspan Event Ġ= Ġlegacy Mapper . map ( model ) ĊĠĠĠĠĠĠĠ Ġval Ġmapped Event Ġ= Ġspan Event Mapper . map ( span Event ) Ġ?: Ġreturn Ġnull ĊĠĠĠĠĠĠĠ Ġreturn Ġspan Serializer . serialize ( mapped Event ) ĊĠĠĠ Ġ} Ċ } Ċ