1

Hadoop のようなプロジェクトには大量のパラメーターがありますが、そのすべてのドキュメントは、コードからではなく、xml から手動で生成されます。

このドキュメントを生成できる注釈を使用して何かを行う方法はありますか?

  public static final String MAP_SORT_SPILL_PERCENT = "mapreduce.map.sort.spill.percent";

  <name>mapreduce.map.sort.spill.percent</name>
  <value>0.80</value>
  <description>The soft limit in the serialization buffer. Once reached, a
  thread will begin to spill the contents to disk in the background. Note that
  collection will not block if this threshold is exceeded while a spill is
  already in progress, so spills may be larger than this threshold when it is
  set to less than .5</description>
4

1 に答える 1

0

@param javadoc タグを使用して、ウィキペディア ページの次の例のように、コードでパラメーター情報を生成できます。

/**
 * Short one line description.                           
 *
 * @param  variable Description text text text.         
 * @return Description text text text.
 */    
public int methodName (...) {
    // method body with a return statement
}

それがOracleがJavaの公式ドキュメントを生成する方法です(例)

于 2015-07-20T22:48:08.920 に答える