Back to Intellij Community

New Method Body.Java

java/java-impl/resources/fileTemplates/code/New Method Body.java.html

2025.3-rc-2880 B
Original Source

| Fills the body of a method when it is generated, e.g. when the Create method from usage intention action is applied.
This built-in template is editable. Along with Java expressions and comments, you can also use the predefined variables that will be then expanded into the corresponding values. |

| Predefined variables take the following values: | | ${RETURN_TYPE} | | Return type of the created method | | ${DEFAULT_RETURN_VALUE} | | Value returned by the method by default | | ${METHOD_NAME} | | Name of the created method | | ${CLASS_NAME} | | Qualified name of the class in which the method is created | | ${SIMPLE_CLASS_NAME} | | Non-qualified name of the class in which the method is implemented | | All the predefined variables from the File Header template (Includes tab) are also available (e.g. ${USER} , ${DATE} , etc.) |