tags:

views:

161

answers:

3

Hello, my JavaDoc doesn't work when I have a code example with an annotation.

Any suggestions?

/**
 * <pre>
 * public class Demo {
 *    @DemoAnnotation
 *    public void demoMethod() {
 *    }
 * }
 * </pre>
 */ 
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface DemoAnnotation {
A: 

Just write &064; instead of @.

More info on escaping here.

Petar Minchev
+2  A: 

Hello,

You must replace @ with &#064; in your JavaDoc.

Espen
A: 

Try adding the @Documented annotation, see Note: in this link.

matsev