如何将方法的Javadoc复制到其他方法的Javadoc中? [英] How can a method's Javadoc be copied into other method's Javadoc?
本文介绍了如何将方法的Javadoc复制到其他方法的Javadoc中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道有 @inheritDoc
,但它只适用于覆盖其他方法的方法。
I know that there is @inheritDoc
, but it's only for methods which override others.
我有几个类有很多委托方法(不覆盖其他方法)。
I have several classes with many delegate methods (which do not override others).
他们的Javadoc可以继承 (更确切地说:复制)?
Can their Javadoc be "inherited" (more exactly: copied)?
/** here I need the copy of wrappedMethod's Javadoc */
public void delegateMethod(Object param){
innerSomething.wrappedMethod(param);
}
推荐答案
@link或@see标签在这里是合适的。如果您正在包装该方法,它必须提供独特的行为,使其不适合过载或其他方式。
A @link or @see tag would be appropriate here. If you're wrapping the method, it must provide distinctive behavior which makes it unsuitable for overloading or otherwise.
这篇关于如何将方法的Javadoc复制到其他方法的Javadoc中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文