2016-06-09 78 views
0

我有一个方法接受Properties对象。是否有记录的方式在Javadoc的性能,如以标准的方式:javadoc属性的参数

/** 
* @param props containing the following optional configuration props 
* "one" -> defaults "hello" 
* "two" -> defaults "bye" 
*/ 
public readProps(Properties props) { 
    one = props.getProperty("one", "hello"); 
    two = props.getProperty("two", "bye"); 
} 

回答

1

我不认为有记录这些信息的标准方式。不过,我会在说明中记录它,而不是在@param标签下。 @param标签应该是参数的简短描述,较长的文字可以放在其他地方。例如:

/** 
* Reads props. 
* A {@link Properties} object is passed to this method containing the 
* following properties: 
* <dl> 
* <dt>one</dt> 
* <dd>first property, defaults to <code>"hello"</code></dd> 
* <dt>two</dt> 
* <dd>second property, defaults to <code>"bye"</code></dd> 
* </dl> 
* 
* @param props the properties 
*/ 
public void readProps(Properties props) { ... }