IntelliJ IDEA suggests using external annotations that are stored outside of the source code. Information about annotated symbols is stored in XML files, rather than in the source code. Each entry maps a method parameter or return value to the desired annotation class.
Such file has the name annotations.xml and resides in the path that depends on the origin of the specific annotation. If an annotation pertains to the SDK, configured for your project, the path is to be defined in the SDK settings. If an annotation pertains to a module, the path should be defined in the module settings.