Suppose your class has 2 methods:
contains() and
containsSame()
The distinction between them is subtle and you’d like to mention it as part of Javadoc
In Javadoc, how can you reference a method in the same class, by name?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the
@linkinline tag, and refer to the method with a leading#.This example only works if there is actually a
contains()method which has no arguments (which, actually, seems to be not that useful). If you have only acontainsmethod with arguments, then either write the argument types in the parentheses:Or you can omit the parentheses completely:
If you have several methods named
contains(with different parameter lists), this version can’t decide which one to use (the link will jump to any of them, hopefully they are all together and do similar things).