@see marker, link other classes methods

Ramy Al Zuhouri picture Ramy Al Zuhouri · Apr 29, 2012 · Viewed 23.9k times · Source

Let's say for example that I want to link java.lang.Double's equals method using a html tag:

@see <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Double.html#equals(java.lang.Object)">

This is ok, but I haven't understood how to link a non-standard class.
For example I am developing two classes, named AbstractVehicle and Vehicle.But there isn't the AbstractVehicle's javadoc documentation because it's documentation has still to be generated.
Then how do I link it's method or class reference? Consider this:

@see mypackage.AbstractVehilce

This doesn't put the class URL, I would know how to get the URL or it's reference before generating the documentation.
I hope that the question is clear, tell me otherwise.

Answer

matsev picture matsev · Apr 29, 2012

To create a link to a specific class you can use the {@link mypackage.AbstractVehicle} tag. Likewise, you can use {@link mypackage.AbstractVehicle#someMethod} to create a link to someMethod() in the AbstractVehicle class.

More javadoc recommendations can be found at Oracle's javadoc - The Java API Documentation Generator page.