-
Notifications
You must be signed in to change notification settings - Fork 549
Predefined Variables for Java Template Snippets
David Thompson edited this page Jul 14, 2026
·
5 revisions
Below are the predefined variables you could use in the template settings such as java.templates.fileHeader and java.templates.typeComment.
-
${file_name}- name of the current Java file -
${package_name}- name of the enclosing package -
${type_name}- name of the current type -
${user}- current user system login name -
${date}- current system date -
${time}- current system time -
${year}- current year -
${month}- current month -
${shortmonth}- short form representation of current month -
${day}- current day of the month -
${hour}- current hour -
${minute}- current minute -
${todo}- the configured task tag (e.g. "TODO")
The following variables apply for relevant templates only:
-
${enclosing_method}- name of the method being implemented or overridden -
${body_statement}- the generated body statement (e.g. a call to the overriddensupermethod) -
${exception_var}- name of the caught exception variable