What is the purpose of an internal interface?

You can find some real-life examples in Kotlin libraries. For example, it can be an internal marker that an exposed implementation conforms to some internal contract, see

It might also have contained some public methods, without them being exposed through any public API surface.

It can also be a part of a completely internal hierarchy of classes and interface, that are not exposed at all

2 Likes