remove ilo run command file
[yosql.git] / yosql-website / content / configuration / annotations / methodComment.md
blob44cd4b8cc0a785084ca8d2cd8d3c0fa4cf1fa522
1 ---
2 title: methodComment
3 date: 2019-09-27T18:51:08+02:00
4 menu:
5   main:
6     parent: Annotations
7 categories:
8   - Configuration
9 tags:
10   - annotations
11   - methods
12 ---
14 Controls what comment should be placed inside the `@Generated` annotation on generated methods. Defaults to `DO NOT MODIFY - automatically generated by YoSQL`.
16 ## Configuration Options
18 ### Option: 'DO NOT MODIFY - automatically generated by YoSQL'
20 The default value of the `methodComment` configuration option is `DO NOT MODIFY - automatically generated by YoSQL`. Setting the option to `DO NOT MODIFY - automatically generated by YoSQL` therefore produces the same code generated as the default configuration.
22 ```java
23 package com.example.persistence;
25 import javax.annotation.processing.Generated;
27 public class SomeRepository {
29     @Generated(
30         value = "YoSQL",
31         date = "<current_timestamp>",
32         comments = "DO NOT MODIFY - automatically generated by YoSQL"
33     )
34     public void someMethod() {
35         // ... some code    
36     }
38     // ... rest of generated code
41 ```
43 ### Option: 'Hello World!'
45 Changing the `methodComment` configuration option to `Hello World!` produces the following code:
47 ```java
48 package com.example.persistence;
50 import javax.annotation.Generated;
52 public class SomeRepository {
54     @Generated(
55         value = "YoSQL",
56         date = "<current_timestamp>",
57         comments = "Hello World!"
58     )
59     public void someMethod() {
60       // ... some code    
61     }
63     // ... rest of generated code
66 ```
68 ## Related Options
70 - [annotateMethods](../annotatemethods/): Controls whether the `@Generated` annotation should be added at all.
71 - [methodMembers](../methodmembers/): Controls which `@Generated` annotation members should be used.
72 - [generatorName](../generatorname/): Controls the value used in the `@Generated` annotation.
74 ## Tooling
76 ### Maven
78 In order to use `YoSQL` together with [Maven](https://maven.apache.org/), take a look at the tooling [documentation
79 for Maven](/tooling/maven/).
81 {{< maven/config/annotations/methodComment >}}
83 ### Gradle
85 In order to use `YoSQL` together with [Gradle](https://gradle.org/), take a look at the tooling [documentation for Gradle](/tooling/gradle/).
87 ```groovy
88 plugins {
89   id("wtf.metio.yosql")
92 yosql {
93   annotations {
94     methodComment = "Hello World!"
95   }
97 ```
99 ### Bazel
101 In order to use `YoSQL` together with [Bazel](https://bazel.build/), take a look at the tooling [documentation for
102 Bazel](/tooling/bazel/).
104 ### CLI
106 In order to use YoSQL on the command line, take a look at the tooling [documentation for CLI](/tooling/cli/).
108 ```shell
109 $ yosql --annotations-method-comment="Hello World!"
112 The shorter form is available as well:
114 ```shell
115 $ yosql --method-comment="Hello World!"