I'm too lazy to write a JavaDoc comment myself, there's a lot of typing and it is mostly boilerplate. Write a program to generate a JavaDoc comment with $ as a placeholder given a method specification.
Example input:
Integer method(int arg1, String arg2) throws InvalidArgumentException, NullPointerException Example output:
/** $ @param arg1 $ @param arg2 $ @return $ @throws InvalidArgumentException $ @throws NullPointerException $ */ Some notes:
- There won't be any
static,private, or other qualifier on the method, just the return type. - There should be no
@returntag if the return type isvoid. - It is possible that there won't be any
throwsclause. - You should accept the one-line method spec on stdin and write the result to stdout.
Shortest code wins.
*you mention are optional in Javadoc comments - they are not needed for this question. \$\endgroup\$[]<>characters in them). You may also assume that all blank spaces are composed of space characters only (i.e., no tabs). There may or may not be spaces surrounding (both before and after) a comma. \$\endgroup\$@return Integer $? \$\endgroup\$