How to link to Constructor from JavaDoc

5 years ago by in How To Tagged: , ,

Say we have the following class and we would like to refer to a specific constructor from within the JavaDoc.

public class MyClass {
  public MyClass(){}
  public MyClass(String param1){}
  public MyClass(int param1){}
}

We can use one of the following

  • @see #MyClass(String)
    
  • {@link #MyClass(String)}
    

Both examples will create a link that points to the second constructor that takes a String as its argument.

Albert Attard

Albert Attard is a Java passionate and technical lead at a research group. You can find him on . Over the past years Albert worked on various Java projects including traditional server/client applications, modular applications, large data handling applications and concurrent data manipulation applications to name a few. He has a BSc degree from the University of London (Homepage) and an MSc Information Security with the same university. His MSc thesis (Book) received the 2012 SearchSecurity.co.UK award (Website).

Leave a Comment


Time limit is exhausted. Please reload the CAPTCHA.