简体   繁体   English

是否可以在Javadoc中引用bean的属性(getter和setter)?

[英]Is there a way to refer bean's property (both getter and setter) in Javadoc?

Suppose I have a class with bean's property sum , which is implemented with setter void setSum(double value) and getter double getSum() . 假设我有一个带有bean属性sum的类,该类使用setter void setSum(double value)和getter double getSum()

Is it possible to refer this by single link in javadoc? 是否可以通过javadoc中的单个链接引用它? Suppose I wish to describe some properties in class' preamble. 假设我想在课堂序言中描述一些属性。 For example, something like this: 例如,如下所示:

/**
 * A Value class is a bunch of aggregation values
 * 
 * {@beanlink #sum} - sum of all values (hypothetic way)
 * 
 * {@link #getSum()} - sum of all values (conventional way)
 * 
 */

There isn't any @beanlink kind of tag in javadoc comments. javadoc注释中没有任何@beanlink类型的标记。 See a full list of allowed tag javadoc of javadoc ;) 查看javadoc的允许标签javadoc的完整列表;)

There is a -tag option that can be used to create custom tags. 有一个-tag选项可用于创建自定义标签。 But that won't perfectly fit for your solution, ie creating links. 但这并不完全适合您的解决方案,即创建链接。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过反射获取bean属性getter或setter? - Get bean property getter or setter by reflection? 使用getter和setter方法将列表添加到bean属性之间的区别? - Difference between using getter and setter methods to add list to a bean property? getter或setter Javadoc是否应提及默认值? - Should default values be mentioned by the getter or setter Javadoc? Bean属性“ cmpcode”不可读或具有无效的getter方法:getter的返回类型是否与setter的参数类型匹配? - Bean property 'cmpcode' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? Bean属性'xxxx不可读或具有无效的getter方法:getter的返回类型是否与setter的参数类型匹配 - Bean property 'xxxx is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter Bean 属性 'xxx' 不可读或具有无效的 getter 方法:getter 的返回类型是否与 setter 的参数类型匹配? - Bean property 'xxx' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? getter和setter是否都应该同步? - Should both getter and setter be synchronized? Kotlin 中预期的属性 getter 或 setter - Property getter or setter expected in Kotlin Spring MVC:Bean属性不可读或具有无效的getter方法getter的返回类型是否与setter的参数类型匹配 - Spring MVC: Bean property is not readable or has an invalid getter method Does the return type of the getter match the parameter type of the setter Bean属性不可读或具有无效的getter方法:getter的返回类型是否与setter的参数类型匹配? 春季批 - Bean property is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? Spring Batch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM