From 959b7e924caf6fcfb7e25aedb89d1a8327ba3b4b Mon Sep 17 00:00:00 2001 From: Markus Kreth Date: Thu, 8 Dec 2022 22:08:05 +0100 Subject: [PATCH] added some comments to generation templates. --- .classpath | 38 ------------------- .gitignore | 6 ++- src/main/resources/template/enum_template.tpl | 2 + .../enum_template_with_initializer.tpl | 5 ++- ...late_with_inner_propertyresourcebundle.tpl | 2 + 5 files changed, 12 insertions(+), 41 deletions(-) delete mode 100644 .classpath diff --git a/.classpath b/.classpath deleted file mode 100644 index 74ff893..0000000 --- a/.classpath +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.gitignore b/.gitignore index 8070aba..f1f6662 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ - -\.settings/ +.classpath +.project +.factorypath +.settings target diff --git a/src/main/resources/template/enum_template.tpl b/src/main/resources/template/enum_template.tpl index 9ee662d..643dd3c 100644 --- a/src/main/resources/template/enum_template.tpl +++ b/src/main/resources/template/enum_template.tpl @@ -8,6 +8,8 @@ import javax.annotation.processing.Generated; /** * Property keys from ${fileName} + * {@link #getValue()} gives the key for the entry, with {@link #getString(UnaryOperator)} + * the value is given directly. */ @Generated(date = "${generation_date}", value = "${generator_name}") public enum ${classname} { diff --git a/src/main/resources/template/enum_template_with_initializer.tpl b/src/main/resources/template/enum_template_with_initializer.tpl index ab44e1b..6101d32 100644 --- a/src/main/resources/template/enum_template_with_initializer.tpl +++ b/src/main/resources/template/enum_template_with_initializer.tpl @@ -8,6 +8,8 @@ import javax.annotation.processing.Generated; /** * Property keys from ${fileName} + * {@link #getValue()} gives the key for the entry, with {@link #getText()} the value for the key is given directly. + * This enum needs to be initialized before any use by {@link #init(UnaryOperator)}. */ @Generated(date = "${generation_date}", value = "${generator_name}") public enum ${classname} { @@ -19,7 +21,8 @@ public enum ${classname} { ${e.constant} ("${e.key}")<#sep>, ; - private static UnaryOperator function; + + private static UnaryOperator function; private final String value; private ${classname} (String value) { diff --git a/src/main/resources/template/enum_template_with_inner_propertyresourcebundle.tpl b/src/main/resources/template/enum_template_with_inner_propertyresourcebundle.tpl index d3955af..0ddfc7d 100644 --- a/src/main/resources/template/enum_template_with_inner_propertyresourcebundle.tpl +++ b/src/main/resources/template/enum_template_with_inner_propertyresourcebundle.tpl @@ -9,6 +9,8 @@ import javax.annotation.processing.Generated; /** * Property keys from ${fileName} + * {@link #getValue()} gives the key for the entry, with {@link #getText()} the value for the key is given directly. + * Initializationis generated also. */ @Generated(date = "${generation_date}", value = "${generator_name}") public enum ${classname} {