Senthil Kumaran
Senthil Kumaran

Reputation: 56813

Javadoc link tag with List parameter

I was writing a javadoc link tag, with the parameter List as something like this.

{@link #getVersionMetadata(String, String, String, List<String>)

It does not feel right to me. And escaping the < and > does not seem acceptable by the IDE.

{@link #getVersionMetadata(String, String, String, List&lt;String&gt;)

What is the correct way to use List<> with javadoc @link?

Upvotes: 1

Views: 4988

Answers (3)

Jesse
Jesse

Reputation: 21

An alternative which works in IntelliJ and actually links to the classes. I'm unsure how it will appear in other IDEs.

{@link List}<{@link String}>

Upvotes: 2

Valentin Ruano
Valentin Ruano

Reputation: 2809

You can change the text in the link to reflect the list type parameter like so...

   {@link #getVersionMetadata(String, String, String, List) getVersionMetaData(String,String,String,List&lt;String&gt;)}

Upvotes: 5

Philipp Cla&#223;en
Philipp Cla&#223;en

Reputation: 43960

That should work:

{@link #getVersionMetadata(String, String, String, List)}

Upvotes: 0

Related Questions