package org.codemucker.jpattern.generate;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marking an annotation with this marks it as being a template
 * for generation. So any class/method/param marked with your custom template annotation
 * will inherit the templates generator annotations
 * 
 * <p>The template annotation source can be in the same project as the sources being 
 * generated as it will be compiled as part of the generation process</p>
 * 
 * <p>NOTE: REMEMBER to mark your annotation as having retention runtime!</p>
 * E.g
 * 
 * <p>
 * <pre>
 * &amp;IsGeneratorTemplate
 * 
 * &amp;GenerateBean(fieldAccess=FieldAccess.PUBLIC)
 * &amp;GenerateBuilder()
 * 
 * &amp;Retention(RetentionPolicy.RUNTIME)
 * public &amp;interface GenerateMyThing { //custom template annotation
 * 
 * }
 * 
 * &amp;GenerateMyThing //this will inherit all the &amp;GenerateBean and &amp;GenerateBuilder settings from the template
 * public class MyBean {
 * 	
 * }
 * 
 * </pre>
 * 
 * This allows a complex or highly custom generation pattern to be be defined in one place instead of copying
 * it all over your codebase. Be careful though not to go overboard and make things more confusing!
 * <p>
 * 
 */
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Target({ElementType.ANNOTATION_TYPE})
public @interface IsGeneratorTemplate {
}

@@ -121,47 +121,8 @@
 pe;%0A
-import java.lang.annotation.Inherited;%0A
 impo
@@ -301,42 +301,45 @@
 g a 
-template%0A * for generation. So any
+generation template. So any %0A * other
  cla
@@ -371,23 +371,16 @@
 th your 
-custom 
 template
@@ -384,48 +384,28 @@
 ate 
-annotation%0A * will inherit the templates
+will inherit all the
  gen
@@ -411,16 +411,20 @@
 nerator 
+%0A * 
 annotati
@@ -426,16 +426,33 @@
 otations
+ on your template
 %0A * %0A * 
@@ -467,27 +467,16 @@
 emplate 
-annotation 
 source c
@@ -539,65 +539,21 @@
 ated
- as it will be compiled as part of the generation process
+, or external
 %3C/p%3E
@@ -666,19 +666,19 @@
 re%3E%0A * &
-amp
+#64
 ;IsGener
@@ -690,35 +690,35 @@
 emplate%0A * %0A * &
-amp
+#64
 ;GenerateBean(fi
@@ -710,20 +710,26 @@
 Generate
-Bean
+Properties
 (fieldAc
@@ -753,27 +753,27 @@
 PUBLIC)%0A * &
-amp
+#64
 ;GenerateBui
@@ -787,19 +787,19 @@
  * %0A * &
-amp
+#64
 ;Retenti
@@ -837,19 +837,19 @@
 public &
-amp
+#64
 ;interfa
@@ -917,29 +917,8 @@
  %0A *
- &amp;GenerateMyThing
  //t
@@ -955,20 +955,26 @@
 Generate
-Bean
+Properties
  and &am
@@ -1018,16 +1018,41 @@
 emplate%0A
+ * &#64;GenerateMyThing %0A
  * publi
@@ -1078,24 +1078,169 @@
  %09%0A * %7D%0A * %0A
+ * //Override a template settings%0A * &#64;GenerateMyThing %0A * &#64;GenerateProperties(fieldNames=%22!(setX*)%22)%0A * public class MyBean2 %7B%0A * %09%0A * %7D%0A
  * %3C/pre%3E%0A *
@@ -1451,16 +1451,20 @@
 fusing!%0A
+ * %0A
  * %3Cp%3E%0A 

Improve javadocs