jeudi 21 février 2019

How to hide an interface in another interface?

I want to write an Android library, which in turn uses another Androd library.

Let's say I want to write libHigh which uses another libLow

There is an interface in libLow:

interface LowLevelInterface{ fun methodA() }

and I implement this in my higher level library libHigh:

open class OpenClassImpl : LowLevelInterface { override fun methodA(){//..} }

It is an 'open' class, because later in app layer I expect to extend from OpenClassImpl. But I dont want to make the interface 'LowLevelInterface' visible for later upper app level usage.

How can I hide the interface from libLow for the upper app level?

Aucun commentaire:

Enregistrer un commentaire