2

Internal visibility modifier provides solution at class level.

The internal visibility modifier is used to declare a member visible within the same module. In my case, a Gradle source set.

However, I need to explore on finding solution that resemble like how java hides internal packages using module config... This way we can do it at package level instead of every class level.

There is also a catch with internal modifier:

The internal modifier is actually compiled to the public modifier and its name is changed so that it is not usable anymore. Still, it is pretty controversial that internal visibility is guarded by Kotlin.

I have two questions:

  1. Is there any other possibility to implement internal behaviour?
  2. Can we do it at the package level ?
Bala
  • 4,427
  • 6
  • 26
  • 29

0 Answers0