IntelliJ IDEA 13.1 Web Help

This section describes formal semantics and usage examples for @NonNls annotation introduced in IntelliJ IDEA. This annotation indicates that the annotated code element is not a string requiring internationalization and it does not contain such strings.

Formal semantics

When an element is annotated with @NonNls, internationalization mechanisms will skip it or strings inside it.

annotated method parameter
A string constant passed as a parameter in the method call is skipped. Also, if the property setter method parameter is annotated, such property values are not highlighted in the GUI Designer forms.
annotated field/variable
String literals in field/variable initializer are skipped.
method is called on an annotated field/parameter/variable
String literals passed as parameters to the method are skipped.
annotated field/parameter/variable passed as a parameter to the equals() method invoked on a string literal
The string literal is skipped.
annotated field/parameter/variable at the left part of the assignment expression
All string literals in the right part of the expression are skipped.
annotated method
All string literals returned by the method are skipped.
annotated class
All string literals in the class and all its subclasses are skipped.
annotated package
All string literals in the package and all its subpackages are skipped.

See Also

Concepts:

Procedures:

Web Resources: