jbailie1991
jbailie1991

Reputation: 1345

Is it bad practice to use a link to a website in @see of a javadoc?

From what i understand about @see, its used to allow users to click through to the javadoc of a class,method etc that is referenced in a javadoc, So if a user has a method that manipulates an image, it may have @see Image.

Is it possible for @see to link to a website? In this case I'm working with an API that has no java docs, but it does have API documentation on the creators website, so the only way the user would be able to look at a class or method I've referenced would be to visit the site anyway. Or is using a website link in @see against its intended purpose?

Upvotes: 2

Views: 135

Answers (2)

aioobe
aioobe

Reputation: 421090

I believe this is fine. There's even an example in the javadoc documentation here

@see <a href="spec.html#section">Java Spec</a>

You run the risk of ending up with stale links of course, especially if bundle your docs in a download. You may want to consider pointing at a redirect page which you control, so that you can update the target page after you've published your docs.

Upvotes: 2

Kevin Krumwiede
Kevin Krumwiede

Reputation: 10308

You can have multiple @see tags, so it's not like you're using up a limited resource on something unconventional. The worst it can possibly be is useless.

Upvotes: 0

Related Questions