This discussion is archived
2 Replies Latest reply: May 18, 2009 5:02 AM by thomas.behr RSS

[newbie]

843810 Newbie
Currently Being Moderated
Some of my comments are not showing up within the javadoc generated. Is there a specific command for having them generated?

public Manager (double bonus)
     {
          super (null,0,0,0,0);
          this._bonus = bonus;
     }
     
     /*
     * @param     name - Manager's name and surname
     * @param salary - Annual salary (€)
     * @param bonus - Annual performance bonus (€)
     * @param year - year of hire date
     * @param     month - month of hire date
     * @param     day - day of hire date
     */

Related links:
http://www.java-forums.org/new-java/19005-javadoc-cannot-compile-param-tags.html
  • 1. Re: [newbie]
    EJP Guru
    Currently Being Moderated
    In the code you posted you have several @param tags for things that aren't parameters. That's an error on your part, not Javadoc's.
  • 2. Re: [newbie]
    thomas.behr Newbie
    Currently Being Moderated
    You really should heed the advice given to you. JavaDoc documentation comments have to start with
    /**
    (note the double asteriks).
    Moreover, @param will only work if the first word of the tag text matches the name of one of the method parameters. E.g.
    /**
     * @param foo a parameter
     */
    public void f( int foo ) {
    }
    will work whereas
    /**
     * @param bar a parameter
     */
    public void f( int foo ) {
    }
    will not.

    BTW - please use [code]...[[i]code]-tags when posting source code.