在Java的Javadoc中,有一种方法可以使用{@inheritDoc}
标签,在子类中继承一个方法的文档。
在Kotlin的KDoc中是否有同样的方法呢?
基本上,我想做的是以下内容:
abstract class Base {
/**
* Some KDoc documentation here.
*/
abstract fun foo()
}
class Derived: Base() {
/**
* Here is all the documentation from Base#foo's KDoc inherited.
*
* And here goes something more in addition.
*/
override fun foo() { /* ... */ }
}
{@inheritDoc}
不起作用吗?你试过了吗? - CaseyB