Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reference resources in javadoc

Tags:

Is it possible to reference resource files (e.g. layout files) in javadoc? I could not find this in the developer docs.

like image 863
Bram Avatar asked Jan 03 '12 12:01

Bram


People also ask

How do you reference a method in Javadoc?

Javadoc provides the @link inline tag for referencing the members in the Java classes. We can think of the @link tag as similar to the anchor tag in HTML, which is used to link one page to another via hyperlinks. Similar to the anchor tag, the path_to_member is the destination, and the label is the display text.

What should be included in a Javadoc?

Before using JavaDoc tool, you must include JavaDoc comments /**……………….. */ providing information about classes, methods, and constructors, etc. For creating a good and understandable document API for any java file you must write better comments for every class, method, constructor.

What does P mean in Javadoc?

Your use of <P> to separate paragraphs will be in line with the rest of the Javadoc output.

What is @link in Java comments?

The @link tag is specifically used to link to the Javadoc of other classes and methods.


2 Answers

Yup it is,

In your javadoc: {@link com.yourApp.R.layout#layoutName}

like image 191
Molten Ice Avatar answered Sep 22 '22 13:09

Molten Ice


I've used #

{@link R.layout#dialog_player_info}

instead of a dot

{@link R.layout.dialog_player_info}

And now it's all OK. Before I was getting this error in Android Studio

Cannot resolve symbol 'R.layout.dialog_player_info' less... (Ctrl+F1) 
This inspection points out unresolved references inside javadoc
like image 38
ViliusK Avatar answered Sep 22 '22 13:09

ViliusK