summaryrefslogtreecommitdiffstats
path: root/configgen/src/test
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2021-12-09 12:17:22 +0000
committerArne H Juul <arnej@yahooinc.com>2021-12-09 12:17:22 +0000
commit0a2b3ad8b43546c891b1a4e3e4850448fd936768 (patch)
tree61a84dbef13884108275ee0ef615ffefcb089de6 /configgen/src/test
parent800c53c580717f7f1d8bcc02d31235ac6d3673d2 (diff)
add extra convenience method to generated builder
* takes a lambda that gets a builder to modify * makes it possible to get rid of some boilerplate code as you don't have to "new" the inner builder on the outside.
Diffstat (limited to 'configgen/src/test')
-rw-r--r--configgen/src/test/resources/allfeatures.reference36
1 files changed, 36 insertions, 0 deletions
diff --git a/configgen/src/test/resources/allfeatures.reference b/configgen/src/test/resources/allfeatures.reference
index e0b6176efa2..08d8aa122c9 100644
--- a/configgen/src/test/resources/allfeatures.reference
+++ b/configgen/src/test/resources/allfeatures.reference
@@ -582,6 +582,18 @@ public final class AllfeaturesConfig extends ConfigInstance {
}
/**
+ * Make a new builder and run the supplied function on it before adding it to the list
+ * @param __func lambda that modifies the given builder
+ * @return this builder
+ */
+ public Builder myArray(java.util.function.Consumer<MyArray.Builder> __func) {
+ MyArray.Builder __inner = new MyArray.Builder();
+ __func.accept(__inner);
+ myArray.add(__inner);
+ return this;
+ }
+
+ /**
* Set the given list as this builder's list of MyArray builders
* @param __builders a list of builders
* @return this builder
@@ -1616,6 +1628,18 @@ public final class AllfeaturesConfig extends ConfigInstance {
}
/**
+ * Make a new builder and run the supplied function on it before adding it to the list
+ * @param __func lambda that modifies the given builder
+ * @return this builder
+ */
+ public Builder anotherArray(java.util.function.Consumer<AnotherArray.Builder> __func) {
+ AnotherArray.Builder __inner = new AnotherArray.Builder();
+ __func.accept(__inner);
+ anotherArray.add(__inner);
+ return this;
+ }
+
+ /**
* Set the given list as this builder's list of AnotherArray builders
* @param __builders a list of builders
* @return this builder
@@ -1914,6 +1938,18 @@ public final class AllfeaturesConfig extends ConfigInstance {
}
/**
+ * Make a new builder and run the supplied function on it before adding it to the list
+ * @param __func lambda that modifies the given builder
+ * @return this builder
+ */
+ public Builder anotherArray(java.util.function.Consumer<AnotherArray.Builder> __func) {
+ AnotherArray.Builder __inner = new AnotherArray.Builder();
+ __func.accept(__inner);
+ anotherArray.add(__inner);
+ return this;
+ }
+
+ /**
* Set the given list as this builder's list of AnotherArray builders
* @param __builders a list of builders
* @return this builder