remove ilo run command file
[yosql.git] / yosql-website / content / configuration / java / useDiamondOperator.md
blobea6c4f2212020e06c590e54888f7344d3e69c514
1 ---
2 title: useDiamondOperator
3 date: 2019-09-27T18:51:08+02:00
4 menu:
5   main:
6     parent: Java
7 categories:
8   - Configuration
9 tags:
10   - Java
11   - generics
12   - diamond
13 ---
15 The `useDiamondOperator` configuration controls whether the diamond operator used in generated code. Note that the diamond operator was introduced with **Java 7**.
17 ## Configuration Options
19 ### Option: 'true'
21 The default value of the `useDiamondOperator` configuration option is `true` which enables the use of the diamond operator in generated code.
23 ### Option: 'false'
25 Changing the `useDiamondOperator` configuration option to `false` disables the use of the diamond operator in generated code.
27 ## Related Options
29 - [apiVersion](../apiversion/): Controls which Java APIs can be used in generated code.
30 - [useFinal](../usefinal/): Controls whether parameters and variables are declared `final`.
31 - [useGenerics](../usegenerics/): Controls whether generic type parameters are used in generated code.
32 - [useRecords](../userecords/): Controls whether records are used in generated code.
33 - [useStreamApi](../usestreamapi/): Controls whether stream API is used in generated code.
34 - [useTextBlocks](../usetextblocks/): Controls whether text blocks are used in generated code.
35 - [useVar](../usevar/): Controls whether the `var` keyword is used in generated code.
37 ## Tooling
39 ### Maven
41 In order to use `YoSQL` together with [Maven](https://maven.apache.org/), take a look at the tooling [documentation for Maven](/tooling/maven/).
43 {{< maven/config/java/useDiamondOperator >}}
45 ### Gradle
47 In order to use `YoSQL` together with [Gradle](https://gradle.org/), take a look at the tooling [documentation for Gradle](/tooling/gradle/).
49 ```kotlin
50 plugins {
51   java
52   id("wtf.metio.yosql") version "2021.4.21"
55 yosql {
56   java {
57     useDiamondOperator.set(false)
58   }
60 ```
62 ```groovy
63 plugins {
64   id "java"
65   id "wtf.metio.yosql" version "2021.4.21"
68 yosql {
69   java {
70     useDiamondOperator = false
71   }
73 ```
75 ### Bazel
77 In order to use `YoSQL` together with [Bazel](https://bazel.build/), take a look at the tooling [documentation for Bazel](/tooling/bazel/).
79 ### CLI
81 In order to use YoSQL on the command line, take a look at the tooling [documentation for CLI](/tooling/cli/).
83 ```shell
84 $ yosql --java-use-diamond-operator=false
85 ```
87 The shorter form is available as well:
89 ```shell
90 $ yosql --use-diamond-operator=false
91 ```