3 date: 2019-09-27T18:51:08+02:00
14 Controls which `@Generated` annotation members should be added to generated classes. Defaults to `WITHOUT_DATE` which uses all members except `date` in order to support reproducible builds (otherwise the generated classes would change on each generation).
16 ## Configuration Options
18 ### Option: 'WITHOUT_DATE'
20 The default value of the `classMembers` configuration option is `WITHOUT_DATE`. Setting the option to `WITHOUT_DATE` therefore produces the same code generated as the default configuration.
23 package com.example.persistence;
25 import javax.annotation.processing.Generated;
29 comments = "DO NOT MODIFY - automatically generated by YoSQL"
31 public class SomeRepository {
33 // ... rest of generated code
40 Changing the `classMembers` configuration option to `ALL` outputs all annotation members.
43 package com.example.persistence;
45 import javax.annotation.processing.Generated;
49 date = "<current_timestamp>",
50 comments = "DO NOT MODIFY - automatically generated by YoSQL"
52 public class SomeRepository {
54 // ... rest of generated code (same as above)
61 Changing the `classMembers` configuration option to `NONE` outputs no annotation members.
64 package com.example.persistence;
66 import javax.annotation.processing.Generated;
69 public class SomeRepository {
71 // ... rest of generated code (same as above)
78 Changing the `classMembers` configuration option to `VALUE` outputs only the `value` member.
81 package com.example.persistence;
83 import javax.annotation.processing.Generated;
88 public class SomeRepository {
90 // ... rest of generated code (same as above)
97 Changing the `classMembers` configuration option to `DATE` outputs only the `date` member.
100 package com.example.persistence;
102 import javax.annotation.processing.Generated;
105 date = "<current_timestamp>"
107 public class SomeRepository {
109 // ... rest of generated code (same as above)
114 ### Option: 'COMMENT'
116 Changing the `classMembers` configuration option to `COMMENT` outputs only the `comment` member.
119 package com.example.persistence;
121 import javax.annotation.processing.Generated;
124 comment = "DO NOT MODIFY - automatically generated by YoSQL"
126 public class SomeRepository {
128 // ... rest of generated code (same as above)
135 - [annotateClasses](../annotateclasses/): Controls whether the `@Generated` annotation should be added at all.
136 - [classComment](../classcomment/): Controls the comment used in the `@Generated` annotation.
137 - [generatorName](../generatorname/): Controls the value used in the `@Generated` annotation.
143 In order to use `YoSQL` together with [Maven](https://maven.apache.org/), take a look at the tooling [documentation
144 for Maven](/tooling/maven/).
146 {{< maven/config/annotations/classMembers >}}
150 In order to use `YoSQL` together with [Gradle](https://gradle.org/), take a look at the tooling [documentation for Gradle](/tooling/gradle/).
154 id("wtf.metio.yosql")
166 In order to use `YoSQL` together with [Bazel](https://bazel.build/), take a look at the tooling [documentation for
167 Bazel](/tooling/bazel/).
171 In order to use YoSQL on the command line, take a look at the tooling [documentation for CLI](/tooling/cli/).
174 $ yosql --annotations-class-members=ALL
177 The shorter form is available as well:
180 $ yosql --class-members=ALL