Search code examples
intellij-idealive-templates

IntelliJ live template, annotated expression


In Intellij live templates, there is a function 'annotated("annotation qname")' (https://www.jetbrains.com/idea/help/live-template-variables.html). How is the function used? What is the function for?


Solution

  • This macro returns all methods/fields/classes annotated with a specified qualified name. It can be useful when creating live templates for a particular framework, where in some place you only expect names of members that are annotated in a special way.

    Some predefined live templates in RESTFul Web Services and Web Services groups are using this macro.