Reputation: 12043
I would like to link a method of another object using @see from a comment block
@see is only giving me the option to link classes, not methods.
What is the hack?
public class A {
B bee;
/**
* Just invoking methodB on bee.
* @see B.methodB() <-- There
*/
public methodA() {
bee.methodB();
}
}
public class B {
/**
* The real stuff
*/
public methodB() {
// real stuff
}
}
Upvotes: 50
Views: 49771
Reputation: 2971
You need to use # instead of .
@see B#methodB()
See the documentation for @see
here.
Upvotes: 17
Reputation: 1986
This applies to javadocs in Eclipse.
Press # and Ctrl+Space to get a "link" to a Member-Method of current context.
In a Javadoc press
SDFCtrl+Space#gDFS Ctrl+SpaceSpaceSymbol
to create the link:
{@link SimpleDateFormat#getDateFormatSymbols() Symbol}
Upvotes: 7