views:

480

answers:

2

Hi all,

I'm trying to document an annotated interface and include a sample of how it's used in the javadoc. e.g.

/**
 * Here's an example usage:
 *
 * <PRE>
 * @IFaceAnnotation(value="")
 * public interface IFace {
 *
 *     @MethodAnnotation("")
 *     public String Method();
 * }
 * </PRE>
 */

However, Javadoc treats my annotations as javadoc instructions (like @param etc.) and as a result only prints:

Here's an example usage:

In the generated documentation. The only way i've been able to stop this is by adding an extra char before the annotation e.g.

/**
 * Here's an example usage:
 *
 * <PRE>
 * \@IFaceAnnotation(value="")
 * public interface IFace {
 *
 *     \@MethodAnnotation("")
 *     public String Method();
 * }
 * </PRE>
 */

but this looks a bit messy.

Just wondered if anyone had any suggestions, Thanks.

+1  A: 

You can use '&#064;' instead of the @, but thats even more ugly.

Mork0075
A: 

Have you tried wrapping it in the {@code} notation?

Lewisham