crgarridos
crgarridos

Reputation: 9273

Is there any equivalent for javadoc's @hide?

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

Answers (2)

asm0dey
asm0dey

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

sorenoid
sorenoid

Reputation: 729

to answer the question, @suppress is equivalent to @hide.

Upvotes: 0

Related Questions