From ecb36de25f20fca1203d6d8b19081bad9699f59c Mon Sep 17 00:00:00 2001 From: Mirko Raner Date: Sun, 7 Jun 2026 15:10:44 -0700 Subject: [PATCH] Issue #3: added `@Generated` annotation for generated sources --- projo/src/main/java/pro/projo/$template/Factory.java | 8 +++++++- projo/src/main/java/pro/projo/$template/Intermediate.java | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/projo/src/main/java/pro/projo/$template/Factory.java b/projo/src/main/java/pro/projo/$template/Factory.java index cb5108d..019c251 100644 --- a/projo/src/main/java/pro/projo/$template/Factory.java +++ b/projo/src/main/java/pro/projo/$template/Factory.java @@ -14,7 +14,11 @@ // limitations under the License. // // // package pro.projo.$template; -/*#*/ + +/* *#* The following import will only appear in generated files: *#/ +import javax.annotation.Generated; +/* */ +/*#*/// These imports will be removed from generated files: import pro.projo.template.annotation.Template; import pro.projo.template.configuration.ProjoFactoryTemplateConfiguration; /*#*/ @@ -35,6 +39,8 @@ * *#*/ @Template(input=ProjoFactoryTemplateConfiguration.class)/*#*/ +/* *#* The following will only appear in generated files: *#/ +@Generated("pro.projo.generation.ProjoTemplateFactoryProcessor") /* */ public interface Factory<_Artifact_, $AdditionalTypeParameters> extends pro.projo.Factory { /*#*/ interface $First {/**/} /*#*/ diff --git a/projo/src/main/java/pro/projo/$template/Intermediate.java b/projo/src/main/java/pro/projo/$template/Intermediate.java index f8edb56..828c8a5 100644 --- a/projo/src/main/java/pro/projo/$template/Intermediate.java +++ b/projo/src/main/java/pro/projo/$template/Intermediate.java @@ -16,8 +16,11 @@ package pro.projo.$template; import java.util.function.Function; +/* *#* The following import will only appear in generated files: *#/ +import javax.annotation.Generated; +/* */ import pro.projo.internal.Prototype; -/*#*/ +/*#*/// These imports will be removed from generated files: import pro.projo.template.annotation.Template; import pro.projo.template.configuration.ProjoIntermediateTemplateConfiguration; /*#*/ @@ -35,6 +38,8 @@ * *#*/ @Template(input=ProjoIntermediateTemplateConfiguration.class)/*#*/ +/* *#* The following will only appear in generated files: *#/ +@Generated("pro.projo.generation.ProjoTemplateFactoryProcessor") /* */ public interface Intermediate<_Artifact_> extends Prototype<_Artifact_> { /*#*/ interface $First {/**/} /*#*/