Reputation: 9273
I'm trying to hide a method that should be visible only for test usage.
Is there any equivalent for javadoc's @hide
I'm not an expert using KDoc neither JavaDoc, If I'm missing any concept please point me to it.
/** @hide */
fun methodToHide() : String = "foo"
Upvotes: 4
Views: 837
Reputation: 2931
If you really want to show that method/function is not part of public API and is exposed only to be testable, it's considered to be a good practice to use annotation @VisibleForTesting
. If you don't have guava or similar library in your project you can create such annotation easiily yourself.
Upvotes: 3