java - how to copy javadoc from variables to constructor -
i having problems javadoc. have written documentation variables of class. , want use same javadoc in constructor. didn't seem able use @link
or @see
purpose (well, netbeans didn't show result liked).
it seems hassle copy-paste everything, there tag/parameter copy javadoc?
here example:
/** * id identifying specific detectionloop. assumed * detectionloops numbered in order, detectionloop '2' next * detectionloop '1'. */ private int id; /** * constructor detectionloop. detectionloops real-world sensors * register , identify kart when passes by. please note * class still under heavy development , parameters of * constructor may change along way! * * @param id id identifying specific detectionloop. assumed * detectionloops numbered in order, detectionloop '2' * next detectionloop '1'. * @param nextid id of next detectionloop sequense. * @param distancetonext distance in meters 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 + " exist, please use unused identification!"); } else { detectionloops.put(this.id, this); } }
this unfortunately impossible using standard javadoc. workaround, use @link
tag reference field, , people click link @ documentation. require click, @ least don't have maintain redundant documentation:
/** * ... * @param id value {@link #id}
the other way of solving know of write custom doclet, allow define your own tag purpose.
Comments
Post a Comment