2013-05-13 2 views
0

Javadoc에 몇 가지 문제가 있습니다. 클래스의 변수에 대한 문서를 작성했습니다. 그리고 나서 같은 javaDoc을 생성자에서 사용하고 싶습니다. 이 목적으로 @link 또는 @see을 사용할 수없는 것 같습니다. Netbeans는 내가 좋아하는 결과를 표시하지 않았습니다.변수에서 생성자로 javadoc를 복사하는 방법

모든 것을 복사하여 붙여 넣기하는 것처럼 보이므로, javaDoc를 복사 할 태그/매개 변수가 있습니까?

/** 
* The id for identifying this specific detectionloop. It is assumed the 
* Detectionloops are numbered in order, so Detectionloop '2' is always next to 
* Detectionloop '1'. 
*/ 
private int id; 

/** 
* Constructor for a detectionloop. Detectionloops are real-world sensors 
* that register and identify a kart when it passes by. Please note that 
* this class is still under heavy development and the parameters of the 
* constructor may change along the way! 
* 
* @param id The id for identifying this specific detectionloop. It is assumed 
* the Detectionloops are numbered in order, so Detectionloop '2' is always 
* next to Detectionloop '1'. 
* @param nextID The id of the next detectionloop is sequense. 
* @param distanceToNext The distance in meters to the next detectionloop. 
*/ 
DetectionLoop(int id, int nextID, int distanceToNext) { 
    this.distanceToNext = distanceToNext; 
    this.id = id; 
    if (Detectionloops.containsKey(id)) { 
     throw new IllegalArgumentException("Detectionloop " + this.id 
       + " already exist, please use a unused identification!"); 
    } else { 
     Detectionloops.put(this.id, this); 
    } 
} 

답변

1

standard Javadoc을 사용하여 불행하게도 불가능하다 : 여기

은 예입니다. 이 문제를 해결하기 위해 @link 태그를 사용하여 필드를 참조하면 사람들이 링크를 클릭하여 해당 문서를 볼 수 있습니다. 중복 문서를 유지하기 위해이 클릭을 필요로하지만, 적어도 당신은하지 않습니다

/** 
* ... 
* @param id the value for {@link #id} 

내가의 사용자가 정의 할 수 있도록 해주는 사용자 정의 도크 렛을 작성하는 것입니다 알고이 해결의 유일한 방법 너의 목적을 위해 your own tag.

관련 문제