3 date: 2019-09-27T18:51:08+02:00
14 Controls which `@Generated` annotation members should be added to generated methods. 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 `methodMembers` 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;
27 public class SomeRepository {
31 comments = "DO NOT MODIFY - automatically generated by YoSQL"
33 public void someMethod() {
37 // ... rest of generated code
44 Changing the `methodMembers` configuration option to `ALL` outputs all annotation members.
47 package com.example.persistence;
49 import javax.annotation.processing.Generated;
51 public class SomeRepository {
55 date = "<current_timestamp>",
56 comments = "DO NOT MODIFY - automatically generated by YoSQL"
58 public void someMethod() {
62 // ... rest of generated code (same as above)
69 Changing the `methodMembers` configuration option to `NONE` outputs no annotation members.
72 package com.example.persistence;
74 import javax.annotation.processing.Generated;
76 public class SomeRepository {
79 public void someMethod() {
83 // ... rest of generated code (same as above)
90 Changing the `methodMembers` configuration option to `VALUE` outputs only the `value` member.
93 package com.example.persistence;
95 import javax.annotation.processing.Generated;
97 public class SomeRepository {
102 public void someMethod() {
106 // ... rest of generated code (same as above)
113 Changing the `methodMembers` configuration option to `DATE` outputs only the `date` member.
116 package com.example.persistence;
118 import javax.annotation.processing.Generated;
120 public class SomeRepository {
123 date = "<current_timestamp>"
125 public void someMethod() {
129 // ... rest of generated code (same as above)
134 ### Option: 'COMMENT'
136 Changing the `methodMembers` configuration option to `COMMENT` outputs only the `comment` member.
139 package com.example.persistence;
141 import javax.annotation.processing.Generated;
143 public class SomeRepository {
146 comments = "DO NOT MODIFY - automatically generated by YoSQL"
148 public void someMethod() {
152 // ... rest of generated code (same as above)
159 - [annotateMethods](../annotatemethods/): Controls whether the `@Generated` annotation should be added at all.
160 - [methodComment](../methodcomment/): Controls the comment used in the `@Generated` annotation.
161 - [generatorName](../generatorname/): Controls the value used in the `@Generated` annotation.
167 In order to use `YoSQL` together with [Maven](https://maven.apache.org/), take a look at the tooling [documentation
168 for Maven](/tooling/maven/).
170 {{< maven/config/annotations/methodMembers >}}
174 In order to use `YoSQL` together with [Gradle](https://gradle.org/), take a look at the tooling [documentation for Gradle](/tooling/gradle/).
178 id("wtf.metio.yosql")
190 In order to use `YoSQL` together with [Bazel](https://bazel.build/), take a look at the tooling [documentation for
191 Bazel](/tooling/bazel/).
195 In order to use YoSQL on the command line, take a look at the tooling [documentation for CLI](/tooling/cli/).
198 $ yosql --annotations-method-members=ALL
201 The shorter form is available as well:
204 $ yosql --method-members=ALL