0

I have a three layers in my application app, data, domain, i will be getting my result entity for my app from domain layer , the result entity class will be implementing with some interface L1, my need is when the result reaches app layer i need to replace the interface L1 which is implemented in result entity to interface L2

Example
Domain

interface L1

The above interface will not contain any methods or variables

data class Result(val data : Any) : L1

App

interface L2

same as like interface L1

data class Result(val data : Any) : L2

I am not sure whether i can achieve using rxkotlin, i had a rough idea about it like

@Binds
abstract fun bindL1WithL2(l2 : L2) : L1

Is there is any solution for this ?
Any help

Stack
  • 1,164
  • 1
  • 13
  • 26

0 Answers0