Is it possible to reuse @param descriptions in JavaDoc?

I have a convenience class for encoding URIs. In it, I created three methods that I use depending on how specifically I should be. I am wondering if there is a reasonable way to reuse @param declarations in this case using JavaDoc? (I did not find them)

 public class URLCreator { public static String getURLString(String host, int port, String path) { return getURLString("http", host, port, path, null); } public static String getURLString(String scheme, String host, int port, String path) { return getURLString(scheme, host, port, path, null); } public static String getURLString(String scheme, String host, int port, String path, String fragment) { try { URI uri = new URI(scheme, null, host, port, path, null, fragment); return uri.toString(); } catch (URISyntaxException e) { throw new RuntimeException(e); } } } 
+2
source share
1 answer

No. Copying works for overridden, but not for overloaded methods. http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javadoc.html#inheritingcomments

0
source

Source: https://habr.com/ru/post/1335612/


All Articles