views:

164

answers:

1

How can you reference an annotation as a code snippet properly in Javadoc?

For example:

<code>
  @Annotation public String field = "";
</code>

The @Annotation gets treated as an unrecognized Javadoc tag rather than a code snippet.

+3  A: 

IIRC,

<code>
  &#64;Annotation public String field = "";
</code>

Or, I believe,

{@code 
  @Annotation public String field = "";
}
Tom Hawtin - tackline
I didn't find that the second one worked, but the first option does work.
Yishai