How do you escape curly braces in javadoc inline tags, such as the {@code} tag

Viewed 14314
/**
 * Gets the meatball icon for a nincompoop.
 * 
 * <p>
 * Example: {@code <custom:meatball color="<%= Meatball.RED %> nincompoop="${person}" />}
 * 
 * @author King Cong
 * 
 */

The "${person}" part breaks the doc comment because it uses curly braces.

7 Answers

Try using HTML escapes:

$&#123;person&#125; == ${person}
Related