在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() { /* ... */ }
}
Run Code Online (Sandbox Code Playgroud)