diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..4fca90cf --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Scala Steward: Reformat with scalafmt 3.7.11 +ce4a4d915166384a8da9211515742a5e045509f0 diff --git a/.scalafmt.conf b/.scalafmt.conf index 1fa273d8..c9867013 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,2 +1,2 @@ -version=3.7.1 +version=3.7.11 runner.dialect=scala3 \ No newline at end of file diff --git a/build.sbt b/build.sbt index 1cd48670..04eed14b 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,9 @@ ThisBuild / scalaVersion := scala3 lazy val commonSettings = Seq( version := "0.28.0", organization := "com.tethys-json", - licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")), + licenses := Seq( + "Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0") + ), homepage := Some(url("https://github.com/tethys-json/tethys")), scmInfo := Some( ScmInfo( @@ -38,7 +40,9 @@ lazy val commonSettings = Seq( url = url("https://github.com/MrIrre") ) ), - credentials ++= Option(Path.userHome / ".config" / "sbt" / ".tethys-credentials") + credentials ++= Option( + Path.userHome / ".config" / "sbt" / ".tethys-credentials" + ) .filter(_.exists()) .map(Credentials(_)), publishMavenStyle := true, @@ -54,7 +58,8 @@ lazy val commonSettings = Seq( def crossScalaSettings = { def addDirsByScalaVersion(path: String): Def.Initialize[Seq[sbt.File]] = scalaVersion.zip(baseDirectory) { case (v, base) => - def extraDirs(versionSpecificFolder: String): Seq[sbt.File] = Seq(base / path / versionSpecificFolder) + def extraDirs(versionSpecificFolder: String): Seq[sbt.File] = + Seq(base / path / versionSpecificFolder) CrossVersion.partialVersion(v) match { case Some((2, y)) if y >= 13 => @@ -67,8 +72,12 @@ def crossScalaSettings = { Seq( crossScalaVersions := Seq(scala213, scala3), - Compile / unmanagedSourceDirectories ++= addDirsByScalaVersion("src/main").value, - Test / unmanagedSourceDirectories ++= addDirsByScalaVersion("src/test").value + Compile / unmanagedSourceDirectories ++= addDirsByScalaVersion( + "src/main" + ).value, + Test / unmanagedSourceDirectories ++= addDirsByScalaVersion( + "src/test" + ).value ) } @@ -79,13 +88,24 @@ lazy val testSettings = Seq( ) ) -lazy val tethys = project.in(file(".")) +lazy val tethys = project + .in(file(".")) .settings( publishTo := None, crossScalaVersions := Seq.empty, commonSettings ) - .aggregate(core, `macro-derivation`, `jackson-211`, `jackson-212`, `jackson-213`, json4s, circe, refined, enumeratum) + .aggregate( + core, + `macro-derivation`, + `jackson-211`, + `jackson-212`, + `jackson-213`, + json4s, + circe, + refined, + enumeratum + ) lazy val modules = file("modules") @@ -98,7 +118,8 @@ def addScalaCompiler(scalaVersion: String): Seq[ModuleID] = case _ => Seq.empty } -lazy val core = project.in(modules / "core") +lazy val core = project + .in(modules / "core") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -107,7 +128,8 @@ lazy val core = project.in(modules / "core") libraryDependencies ++= addScalaCompiler(scalaVersion.value) ) -lazy val `macro-derivation` = project.in(modules / "macro-derivation") +lazy val `macro-derivation` = project + .in(modules / "macro-derivation") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -123,7 +145,8 @@ lazy val jacksonSettings = Seq( Test / unmanagedResourceDirectories += modules / "jackson-backend" / "src" / "test" / "resources" ) -lazy val `jackson-211` = project.in(modules / "jackson-211") +lazy val `jackson-211` = project + .in(modules / "jackson-211") .settings(crossScalaSettings) .settings(commonSettings) .settings(jacksonSettings) @@ -136,7 +159,8 @@ lazy val `jackson-211` = project.in(modules / "jackson-211") ) .dependsOn(core) -lazy val `jackson-212` = project.in(modules / "jackson-212") +lazy val `jackson-212` = project + .in(modules / "jackson-212") .settings(crossScalaSettings) .settings(commonSettings) .settings(jacksonSettings) @@ -149,7 +173,8 @@ lazy val `jackson-212` = project.in(modules / "jackson-212") ) .dependsOn(core) -lazy val `jackson-213` = project.in(modules / "jackson-213") +lazy val `jackson-213` = project + .in(modules / "jackson-213") .settings(crossScalaSettings) .settings(commonSettings) .settings(jacksonSettings) @@ -162,7 +187,8 @@ lazy val `jackson-213` = project.in(modules / "jackson-213") ) .dependsOn(core) -lazy val circe = project.in(modules / "circe") +lazy val circe = project + .in(modules / "circe") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -174,7 +200,8 @@ lazy val circe = project.in(modules / "circe") ) .dependsOn(core, `jackson-212` % Test) -lazy val json4s = project.in(modules / "json4s") +lazy val json4s = project + .in(modules / "json4s") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -186,7 +213,8 @@ lazy val json4s = project.in(modules / "json4s") ) .dependsOn(core) -lazy val enumeratum = project.in(modules / "enumeratum") +lazy val enumeratum = project + .in(modules / "enumeratum") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -203,7 +231,8 @@ lazy val enumeratum = project.in(modules / "enumeratum") ) .dependsOn(core) -lazy val refined = project.in(modules / "refined") +lazy val refined = project + .in(modules / "refined") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -215,7 +244,8 @@ lazy val refined = project.in(modules / "refined") ) .dependsOn(core) -lazy val benchmarks = project.in(modules / "benchmarks") +lazy val benchmarks = project + .in(modules / "benchmarks") .settings(crossScalaSettings) .settings(commonSettings) .settings( @@ -229,12 +259,12 @@ lazy val benchmarks = project.in(modules / "benchmarks") "io.circe" %% "circe-jawn" % "0.14.3", "io.circe" %% "circe-jackson210" % "0.14.0", "com.typesafe.play" %% "play-json" % "2.10.0-RC7", - "org.knowm.xchart" % "xchart" % "3.8.2" exclude("de.erichseifert.vectorgraphics2d", "VectorGraphics2D") withSources() + "org.knowm.xchart" % "xchart" % "3.8.2" exclude ("de.erichseifert.vectorgraphics2d", "VectorGraphics2D") withSources () ), scalacOptions ++= { CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, 13)) => Seq("-Ymacro-annotations") - case _ => Seq.empty + case _ => Seq.empty } } ) diff --git a/modules/benchmarks/src/main/scala/json/bench/BenchMarkdown.scala b/modules/benchmarks/src/main/scala/json/bench/BenchMarkdown.scala index e8de31c7..d3c42b70 100644 --- a/modules/benchmarks/src/main/scala/json/bench/BenchMarkdown.scala +++ b/modules/benchmarks/src/main/scala/json/bench/BenchMarkdown.scala @@ -19,23 +19,23 @@ object BenchMarkdown { val benchmarksOrdering: Ordering[String] = Ordering.by[String, Int] { case "Parsing" | "json.bench.JmhReaderBench.bench" => 1 case "Writing" | "json.bench.JmhWriterBench.bench" => 2 - case _ => 3 + case _ => 3 } val processorsOrdering: Ordering[String] = Ordering.by[String, Int] { - case "tethys-jackson" => 1 - case "pure-jackson" => 2 - case "circe" => 3 - case "circe-jawn" => 4 - case "circe-jackson" => 5 + case "tethys-jackson" => 1 + case "pure-jackson" => 2 + case "circe" => 3 + case "circe-jawn" => 4 + case "circe-jackson" => 5 case "java.lang.StringBuilder" => 6 - case "scala.StringBuilder" => 7 - case "json4s-jackson" => 8 - case "json4s-native" => 9 - case "play-json" => 10 - case "spray-json" => 11 - case "pushka" => 12 - case _ => 13 + case "scala.StringBuilder" => 7 + case "json4s-jackson" => 8 + case "json4s-native" => 9 + case "play-json" => 10 + case "spray-json" => 11 + case "pushka" => 12 + case _ => 13 } val namesMapping = Map( @@ -43,18 +43,31 @@ object BenchMarkdown { "json.bench.JmhWriterBench.bench" -> "Writing" ) - implicit val mbScore: JsonReader[Either[String, Double]] = new JsonReader[Either[String, Double]] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): Either[String, Double] = { - if(it.currentToken().isNumberValue) Right(Math.round(JsonReader.doubleReader.read(it) * 1000) / 1000.0) - else Left(JsonReader.stringReader.read(it)) + implicit val mbScore: JsonReader[Either[String, Double]] = + new JsonReader[Either[String, Double]] { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): Either[String, Double] = { + if (it.currentToken().isNumberValue) + Right(Math.round(JsonReader.doubleReader.read(it) * 1000) / 1000.0) + else Left(JsonReader.stringReader.read(it)) + } } - } - implicit val primaryMetricsReader: JsonReader[PrimaryMetrics] = jsonReader[PrimaryMetrics] + implicit val primaryMetricsReader: JsonReader[PrimaryMetrics] = + jsonReader[PrimaryMetrics] implicit val benchmarkReader: JsonReader[Benchmark] = jsonReader[Benchmark] - case class Benchmark(benchmark: String, mode: String, params: mutable.LinkedHashMap[String, String], primaryMetric: PrimaryMetrics) - case class PrimaryMetrics(score: Either[String, Double], scoreError: Either[String, Double]) + case class Benchmark( + benchmark: String, + mode: String, + params: mutable.LinkedHashMap[String, String], + primaryMetric: PrimaryMetrics + ) + case class PrimaryMetrics( + score: Either[String, Double], + scoreError: Either[String, Double] + ) def readBenchmarks(dir: String, file: String): Seq[Benchmark] = { val jhmResultsPath = Paths.get(dir, file) @@ -64,14 +77,21 @@ object BenchMarkdown { def main(args: Array[String]): Unit = { val List(dir) = args.toList - val benchs = readBenchmarks(dir, "jmh-reader.json") ++ readBenchmarks(dir, "jmh-writer.json") + val benchs = readBenchmarks(dir, "jmh-reader.json") ++ readBenchmarks( + dir, + "jmh-writer.json" + ) val grouped = benchs.groupBy(_.benchmark) val mainTables = grouped.toList.sortBy(_._1)(benchmarksOrdering).map { case (name, benchmarks) => - val rows = benchmarks.map(_.params(nameColumn)).distinct.sorted(processorsOrdering) + val rows = benchmarks + .map(_.params(nameColumn)) + .distinct + .sorted(processorsOrdering) val colls = benchmarks.map(_.params(sizeColumn)).distinct val data = benchmarks.map { b => - (b.params(nameColumn), b.params(sizeColumn)) -> b.primaryMetric.score.fold(identity, _.toString) + (b.params(nameColumn), b.params(sizeColumn)) -> b.primaryMetric.score + .fold(identity, _.toString) }.toMap s""" @@ -89,7 +109,7 @@ object BenchMarkdown { private def chart(name: String, bs: Seq[Benchmark], dir: String): String = { val title = namesMapping.getOrElse(name, name) val images = Paths.get(dir, "images") - if(Files.notExists(images)) { + if (Files.notExists(images)) { Files.createDirectory(images) } val imgPath = dir + "/images/" + title + "Performance" @@ -100,16 +120,25 @@ object BenchMarkdown { """.stripMargin } - private def table(rows: Seq[String], columns: Seq[String], data: Map[(String, String), String]): String = { + private def table( + rows: Seq[String], + columns: Seq[String], + data: Map[(String, String), String] + ): String = { val header = columns.foldLeft("name \\ size")(_ + "|" + _) val line = columns.map(_ => "---").foldLeft("---")(_ + "|" + _) val dataLines = rows.map { row => - columns.map(col => data.getOrElse((row, col), " ")).foldLeft(row)(_ + "|" + _) + columns + .map(col => data.getOrElse((row, col), " ")) + .foldLeft(row)(_ + "|" + _) } dataLines.foldLeft(header + "\n" + line)(_ + "\n" + _) } - private def buildPerformanceChart(title: String, benchmarks: Seq[Benchmark]): CategoryChart = { + private def buildPerformanceChart( + title: String, + benchmarks: Seq[Benchmark] + ): CategoryChart = { val chart: CategoryChart = new CategoryChartBuilder() .width(940) .height(400) @@ -118,12 +147,15 @@ object BenchMarkdown { .xAxisTitle("size") .build() - val maxs = benchmarks.groupBy(_.params(sizeColumn)).map { - case (size, bs) => size -> bs.map(_.primaryMetric.score.fold(_ => 0.0, identity)).max + val maxs = benchmarks.groupBy(_.params(sizeColumn)).map { case (size, bs) => + size -> bs.map(_.primaryMetric.score.fold(_ => 0.0, identity)).max } - benchmarks.groupBy(_.params(nameColumn)).toList.sortBy(_._1)(processorsOrdering).foreach { - case (name, bs) => + benchmarks + .groupBy(_.params(nameColumn)) + .toList + .sortBy(_._1)(processorsOrdering) + .foreach { case (name, bs) => import scala.collection.JavaConverters._ val data = bs.map { b => @@ -133,7 +165,7 @@ object BenchMarkdown { val xData = data.map(_._1).asJava val yData = data.map(t => Double.box(t._2)).asJava chart.addSeries(name, xData, yData) - } + } chart } diff --git a/modules/benchmarks/src/main/scala/json/bench/JmhReaderBench.scala b/modules/benchmarks/src/main/scala/json/bench/JmhReaderBench.scala index 72337ff9..cc1caf1c 100644 --- a/modules/benchmarks/src/main/scala/json/bench/JmhReaderBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/JmhReaderBench.scala @@ -13,41 +13,45 @@ import org.openjdk.jmh.annotations.{State, _} @Fork(value = 1, jvmArgsAppend = Array("-Xms1G", "-Xmx1G")) @State(Scope.Benchmark) class JmhReaderBench { - @Param(Array( - "128b", - "1kb", - "128kb", - "1mb", - "32mb" - )) + @Param( + Array( + "128b", + "1kb", + "128kb", + "1mb", + "32mb" + ) + ) var jsonSize: String = _ val seed = 10000 - var data: String =_ + var data: String = _ @Setup(Level.Trial) def setup(): Unit = { val entities = jsonSize match { - case "128b" => Data.dataSamples(1, seed) - case "1kb" => Data.dataSamples(8, seed) + case "128b" => Data.dataSamples(1, seed) + case "1kb" => Data.dataSamples(8, seed) case "128kb" => Data.dataSamples(128 * 8, seed) - case "1mb" => Data.dataSamples(8 * 128 * 8, seed) - case "32mb" => Data.dataSamples(32 * 8 * 128 * 8, seed) + case "1mb" => Data.dataSamples(8 * 128 * 8, seed) + case "32mb" => Data.dataSamples(32 * 8 * 128 * 8, seed) } data = TethysJacksonDataProcessor.write(entities) } - @Param(Array( - "tethys-jackson", - "pure-jackson", - "circe-jawn", - "circe-jackson", - "json4s-jackson", - "json4s-native", - "play-json", - "spray-json" - )) + @Param( + Array( + "tethys-jackson", + "pure-jackson", + "circe-jawn", + "circe-jackson", + "json4s-jackson", + "json4s-native", + "play-json", + "spray-json" + ) + ) var processorName: String = _ @Benchmark diff --git a/modules/benchmarks/src/main/scala/json/bench/JmhWriterBench.scala b/modules/benchmarks/src/main/scala/json/bench/JmhWriterBench.scala index 0ba583e1..eff724d9 100644 --- a/modules/benchmarks/src/main/scala/json/bench/JmhWriterBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/JmhWriterBench.scala @@ -12,13 +12,15 @@ import org.openjdk.jmh.annotations._ @Fork(value = 1, jvmArgsAppend = Array("-Xms1G", "-Xmx1G")) @State(Scope.Benchmark) class JmhWriterBench { - @Param(Array( - "128b", - "1kb", - "128kb", - "1mb", - "32mb" - )) + @Param( + Array( + "128b", + "1kb", + "128kb", + "1mb", + "32mb" + ) + ) var jsonSize: String = _ val seed = 10000 @@ -27,25 +29,27 @@ class JmhWriterBench { @Setup(Level.Trial) def setup(): Unit = { data = jsonSize match { - case "128b" => Data.dataSamples(1, seed) - case "1kb" => Data.dataSamples(8, seed) + case "128b" => Data.dataSamples(1, seed) + case "1kb" => Data.dataSamples(8, seed) case "128kb" => Data.dataSamples(128 * 8, seed) - case "1mb" => Data.dataSamples(8 * 128 * 8, seed) - case "32mb" => Data.dataSamples(32 * 8 * 128 * 8, seed) + case "1mb" => Data.dataSamples(8 * 128 * 8, seed) + case "32mb" => Data.dataSamples(32 * 8 * 128 * 8, seed) } } - @Param(Array( - "tethys-jackson", - "pure-jackson", - "circe", - "java.lang.StringBuilder", - "scala.StringBuilder", - "json4s-jackson", - "json4s-native", - "play-json", - "spray-json" - )) + @Param( + Array( + "tethys-jackson", + "pure-jackson", + "circe", + "java.lang.StringBuilder", + "scala.StringBuilder", + "json4s-jackson", + "json4s-native", + "play-json", + "spray-json" + ) + ) var processorName: String = _ @Benchmark diff --git a/modules/benchmarks/src/main/scala/json/bench/circe/CirceBench.scala b/modules/benchmarks/src/main/scala/json/bench/circe/CirceBench.scala index 87f8a2e6..1527cc68 100644 --- a/modules/benchmarks/src/main/scala/json/bench/circe/CirceBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/circe/CirceBench.scala @@ -15,10 +15,12 @@ object CirceBench { } object CirceJawnDataReader extends DataReader { - override def read(json: String): Seq[Data] = jawn.decode[Seq[Data]](json).toOption.get + override def read(json: String): Seq[Data] = + jawn.decode[Seq[Data]](json).toOption.get } object CirceJacksonDataReader extends DataReader { - override def read(json: String): Seq[Data] = jackson.decode[Seq[Data]](json).toOption.get + override def read(json: String): Seq[Data] = + jackson.decode[Seq[Data]](json).toOption.get } } diff --git a/modules/benchmarks/src/main/scala/json/bench/handwritten/HandwrittenBench.scala b/modules/benchmarks/src/main/scala/json/bench/handwritten/HandwrittenBench.scala index 42d27f32..5b822272 100644 --- a/modules/benchmarks/src/main/scala/json/bench/handwritten/HandwrittenBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/handwritten/HandwrittenBench.scala @@ -14,10 +14,10 @@ object HandwrittenBench { val builder = new StringBuilder("[") val dataIterator = seq.iterator - if(dataIterator.hasNext) { + if (dataIterator.hasNext) { writeData(dataIterator.next(), builder) } - while(dataIterator.hasNext) { + while (dataIterator.hasNext) { writeData(dataIterator.next(), builder.append(",")) } @@ -45,10 +45,10 @@ object HandwrittenBench { .append('[') val intIter = data.seqInt.iterator - if(intIter.hasNext) { + if (intIter.hasNext) { builder.append(intIter.next()) } - while(intIter.hasNext) { + while (intIter.hasNext) { builder.append(",").append(intIter.next()) } @@ -58,11 +58,11 @@ object HandwrittenBench { .append('{') val mapStringIntIter = data.mapStringInt.iterator - if(mapStringIntIter.hasNext) { + if (mapStringIntIter.hasNext) { val (key, value) = mapStringIntIter.next() builder.appendName(key).append(value) } - while(mapStringIntIter.hasNext) { + while (mapStringIntIter.hasNext) { val (key, value) = mapStringIntIter.next() builder.appendName(key).append(value) } @@ -73,7 +73,8 @@ object HandwrittenBench { } - private implicit class ScalaBuilderOps(val builder: StringBuilder) extends AnyVal { + private implicit class ScalaBuilderOps(val builder: StringBuilder) + extends AnyVal { def appendName(name: String): StringBuilder = { builder.append('"') appendString(builder, name) @@ -89,32 +90,33 @@ object HandwrittenBench { private def appendString(builder: StringBuilder, s: String): Unit = { var i = 0 - while(i < s.length) { + while (i < s.length) { appendChar(builder, s.charAt(i)) i = i + 1 } } - private def appendChar(builder: StringBuilder, char: Char): Unit = char match { - case '\n' => builder.append("\\n") - case '\r' => builder.append("\\r") - case '\t' => builder.append("\\t") - case '\b' => builder.append("\\b") - case '\f' => builder.append("\\f") - case '\\' => builder.append("\\\\") - case '"' => builder.append("\\\"") - case _ => builder.append(char) - } + private def appendChar(builder: StringBuilder, char: Char): Unit = + char match { + case '\n' => builder.append("\\n") + case '\r' => builder.append("\\r") + case '\t' => builder.append("\\t") + case '\b' => builder.append("\\b") + case '\f' => builder.append("\\f") + case '\\' => builder.append("\\\\") + case '"' => builder.append("\\\"") + case _ => builder.append(char) + } object HandwrittenJavaDataWriter extends DataWriter { override def write(seq: Seq[Data]): String = { val builder = new java.lang.StringBuilder("[") val dataIterator = seq.iterator - if(dataIterator.hasNext) { + if (dataIterator.hasNext) { writeData(dataIterator.next(), builder) } - while(dataIterator.hasNext) { + while (dataIterator.hasNext) { writeData(dataIterator.next(), builder.append(",")) } @@ -123,7 +125,10 @@ object HandwrittenBench { .toString() } - private def writeData(data: Data, builder: java.lang.StringBuilder): Unit = { + private def writeData( + data: Data, + builder: java.lang.StringBuilder + ): Unit = { builder .append("{") .appendName("string") @@ -142,10 +147,10 @@ object HandwrittenBench { .append('[') val intIter = data.seqInt.iterator - if(intIter.hasNext) { + if (intIter.hasNext) { builder.append(intIter.next()) } - while(intIter.hasNext) { + while (intIter.hasNext) { builder.append(",").append(intIter.next()) } @@ -155,11 +160,11 @@ object HandwrittenBench { .append('{') val mapStringIntIter = data.mapStringInt.iterator - if(mapStringIntIter.hasNext) { + if (mapStringIntIter.hasNext) { val (key, value) = mapStringIntIter.next() builder.appendName(key).append(value) } - while(mapStringIntIter.hasNext) { + while (mapStringIntIter.hasNext) { val (key, value) = mapStringIntIter.next() builder.appendName(key).append(value) } @@ -169,7 +174,8 @@ object HandwrittenBench { } } - private implicit class JavaBuilderOps(val builder: java.lang.StringBuilder) extends AnyVal { + private implicit class JavaBuilderOps(val builder: java.lang.StringBuilder) + extends AnyVal { def appendName(name: String): java.lang.StringBuilder = { builder.append('"') appendString(builder, name) @@ -183,24 +189,28 @@ object HandwrittenBench { } } - private def appendString(builder: java.lang.StringBuilder, s: String): Unit = { + private def appendString( + builder: java.lang.StringBuilder, + s: String + ): Unit = { var i = 0 - while(i < s.length) { + while (i < s.length) { appendChar(builder, s.charAt(i)) i = i + 1 } } - private def appendChar(builder: java.lang.StringBuilder, char: Char): Unit = char match { - case '\n' => builder.append("\\n") - case '\r' => builder.append("\\r") - case '\t' => builder.append("\\t") - case '\b' => builder.append("\\b") - case '\f' => builder.append("\\f") - case '\\' => builder.append("\\\\") - case '"' => builder.append("\\\"") - case _ => builder.append(char) - } + private def appendChar(builder: java.lang.StringBuilder, char: Char): Unit = + char match { + case '\n' => builder.append("\\n") + case '\r' => builder.append("\\r") + case '\t' => builder.append("\\t") + case '\b' => builder.append("\\b") + case '\f' => builder.append("\\f") + case '\\' => builder.append("\\\\") + case '"' => builder.append("\\\"") + case _ => builder.append(char) + } object HandwrittenJacksonDataProcessor extends DataWriter with DataReader { private val jsonFactory = { @@ -227,7 +237,7 @@ object HandwrittenBench { generator.writeStartArray() val dataIterator = seq.iterator - while(dataIterator.hasNext) { + while (dataIterator.hasNext) { writeData(dataIterator.next(), generator) } @@ -251,11 +261,10 @@ object HandwrittenBench { generator.writeFieldName("bigDecimal") generator.writeNumber(data.bigDecimal.bigDecimal) - generator.writeFieldName("seqInt") generator.writeStartArray() val intIter = data.seqInt.iterator - while(intIter.hasNext) { + while (intIter.hasNext) { generator.writeNumber(intIter.next) } generator.writeEndArray() @@ -264,7 +273,7 @@ object HandwrittenBench { generator.writeStartObject() val mapStringIntIter = data.mapStringInt.iterator - while(mapStringIntIter.hasNext) { + while (mapStringIntIter.hasNext) { val (key, value) = mapStringIntIter.next() generator.writeFieldName(key) generator.writeNumber(value) @@ -278,7 +287,7 @@ object HandwrittenBench { val parser = jsonParser(json) val builder = Seq.newBuilder[Data] require(parser.nextToken() == JsonToken.START_ARRAY) - while(parser.nextToken() != JsonToken.END_ARRAY) { + while (parser.nextToken() != JsonToken.END_ARRAY) { builder += readDataObject(parser) } builder.result() @@ -303,24 +312,24 @@ object HandwrittenBench { var mapStringIntField: Map[String, Int] = null var mapStringIntFieldInitialized: Boolean = false - while(parser.nextToken() != JsonToken.END_OBJECT) { + while (parser.nextToken() != JsonToken.END_OBJECT) { val field = parser.getCurrentName - if(field == "string") { + if (field == "string") { stringField = parser.nextTextValue() stringFieldInitialized = true - } else if(field == "int") { + } else if (field == "int") { parser.nextToken() intField = parser.getIntValue intFieldInitialized = true - } else if(field == "boolean") { + } else if (field == "boolean") { booleanField = parser.nextBooleanValue() booleanFieldInitialized = true - } else if(field == "bigDecimal") { + } else if (field == "bigDecimal") { parser.nextToken() bigDecimalField = BigDecimal(parser.getNumberValue.doubleValue()) bigDecimalFieldInitialized = true - } else if(field == "seqInt") { + } else if (field == "seqInt") { seqIntField = readSeqOfInt(parser) seqIntFieldInitialized = true } else { @@ -329,7 +338,9 @@ object HandwrittenBench { } } - require(stringFieldInitialized && intFieldInitialized && booleanFieldInitialized && bigDecimalFieldInitialized && mapStringIntFieldInitialized) + require( + stringFieldInitialized && intFieldInitialized && booleanFieldInitialized && bigDecimalFieldInitialized && mapStringIntFieldInitialized + ) Data( string = stringField, diff --git a/modules/benchmarks/src/main/scala/json/bench/json4s/Json4sBench.scala b/modules/benchmarks/src/main/scala/json/bench/json4s/Json4sBench.scala index ce5c3656..c1a17b71 100644 --- a/modules/benchmarks/src/main/scala/json/bench/json4s/Json4sBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/json4s/Json4sBench.scala @@ -8,14 +8,18 @@ object Json4sBench { implicit val format: DefaultFormats.type = DefaultFormats object Json4sNativeDataProcessor extends DataWriter with DataReader { - override def write(seq: Seq[Data]): String = org.json4s.native.Serialization.write(seq) + override def write(seq: Seq[Data]): String = + org.json4s.native.Serialization.write(seq) - override def read(json: String): Seq[Data] = org.json4s.native.parseJson(json).extract[Seq[Data]] + override def read(json: String): Seq[Data] = + org.json4s.native.parseJson(json).extract[Seq[Data]] } object Json4sJacksonDataProcessor extends DataWriter with DataReader { - override def write(seq: Seq[Data]): String = org.json4s.jackson.Serialization.write(seq) + override def write(seq: Seq[Data]): String = + org.json4s.jackson.Serialization.write(seq) - override def read(json: String): Seq[Data] = org.json4s.jackson.parseJson(json).extract[Seq[Data]] + override def read(json: String): Seq[Data] = + org.json4s.jackson.parseJson(json).extract[Seq[Data]] } } diff --git a/modules/benchmarks/src/main/scala/json/bench/model/Data.scala b/modules/benchmarks/src/main/scala/json/bench/model/Data.scala index a171da38..b6674018 100644 --- a/modules/benchmarks/src/main/scala/json/bench/model/Data.scala +++ b/modules/benchmarks/src/main/scala/json/bench/model/Data.scala @@ -2,16 +2,22 @@ package json.bench.model import scala.util.Random -case class Data(string: String, - int: Int, - boolean: Boolean, - bigDecimal: BigDecimal, - seqInt: Seq[Int], - mapStringInt: Map[String, Int]) +case class Data( + string: String, + int: Int, + boolean: Boolean, + bigDecimal: BigDecimal, + seqInt: Seq[Int], + mapStringInt: Map[String, Int] +) object Data { - def samples[JAst](dataBuilder: DataBuilder[JAst], count: Int, seed: Int): JAst = { + def samples[JAst]( + dataBuilder: DataBuilder[JAst], + count: Int, + seed: Int + ): JAst = { val asts = dataSamples(count, seed).map(dataBuilder.ast) dataBuilder.array(asts) } @@ -27,7 +33,7 @@ object Data { (1 to count).toList.map { i => val flag = (i % 2) == 0 - //128 bytes entity + // 128 bytes entity Data( // 2 bytes string = rndString(6 - (if (flag) 0 else 1)), // 9 + 8 (7) + 1 bytes int = rndInt(3), // 6 + 3 + 1 bytes diff --git a/modules/benchmarks/src/main/scala/json/bench/play/PlayBench.scala b/modules/benchmarks/src/main/scala/json/bench/play/PlayBench.scala index 085c61f8..7316cf45 100644 --- a/modules/benchmarks/src/main/scala/json/bench/play/PlayBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/play/PlayBench.scala @@ -10,7 +10,8 @@ object PlayBench { implicit val dataReads: Reads[Data] = Json.reads[Data] object PlayDataProcessor extends DataWriter with DataReader { - override def write(seq: Seq[Data]): String = Json.stringify(Json.toJson(seq)) + override def write(seq: Seq[Data]): String = + Json.stringify(Json.toJson(seq)) override def read(json: String): Seq[Data] = Json.parse(json).as[Seq[Data]] } diff --git a/modules/benchmarks/src/main/scala/json/bench/spray/SprayBench.scala b/modules/benchmarks/src/main/scala/json/bench/spray/SprayBench.scala index a5f87a54..849fd6de 100644 --- a/modules/benchmarks/src/main/scala/json/bench/spray/SprayBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/spray/SprayBench.scala @@ -12,7 +12,8 @@ object SprayBench { object SprayDataProcessor extends DataWriter with DataReader { override def write(seq: Seq[Data]): String = seq.toJson.compactPrint - override def read(json: String): Seq[Data] = json.parseJson.convertTo[Seq[Data]] + override def read(json: String): Seq[Data] = + json.parseJson.convertTo[Seq[Data]] } } diff --git a/modules/benchmarks/src/main/scala/json/bench/tethysjson/TethysBench.scala b/modules/benchmarks/src/main/scala/json/bench/tethysjson/TethysBench.scala index 4f9ec9db..099b200e 100644 --- a/modules/benchmarks/src/main/scala/json/bench/tethysjson/TethysBench.scala +++ b/modules/benchmarks/src/main/scala/json/bench/tethysjson/TethysBench.scala @@ -6,8 +6,7 @@ import tethys.jackson._ import tethys.derivation.semiauto._ import json.bench.{DataReader, DataWriter} -/** - * Created by eld0727 on 21.04.17. +/** Created by eld0727 on 21.04.17. */ object TethysBench { @@ -18,6 +17,7 @@ object TethysBench { override def write(seq: Seq[Data]): String = seq.asJson - override def read(json: String): Seq[Data] = json.jsonAs[Seq[Data]].toOption.get + override def read(json: String): Seq[Data] = + json.jsonAs[Seq[Data]].toOption.get } } diff --git a/modules/circe/src/main/scala/io.circe/JsonNumberHack.scala b/modules/circe/src/main/scala/io.circe/JsonNumberHack.scala index a4f78dea..950cdcfc 100644 --- a/modules/circe/src/main/scala/io.circe/JsonNumberHack.scala +++ b/modules/circe/src/main/scala/io.circe/JsonNumberHack.scala @@ -4,7 +4,7 @@ import tethys.writers.tokens.TokenWriter trait JsonNumberHack { protected def writeNumber(number: JsonNumber, writer: TokenWriter): Unit = { - if(JsonNumberHack.isHackCompatible) { + if (JsonNumberHack.isHackCompatible) { number match { case value: JsonDecimal => writer.writeRawJson(value.toString) @@ -27,17 +27,18 @@ trait JsonNumberHack { } object JsonNumberHack { - private val isHackCompatible: Boolean = try { - val loader = getClass.getClassLoader - loader.loadClass("io.circe.BiggerDecimalJsonNumber") - loader.loadClass("io.circe.JsonDecimal") - loader.loadClass("io.circe.JsonBiggerDecimal") - loader.loadClass("io.circe.JsonBigDecimal") - loader.loadClass("io.circe.JsonLong") - loader.loadClass("io.circe.JsonDouble") - loader.loadClass("io.circe.JsonFloat") - true - } catch { - case _: ClassNotFoundException => false - } + private val isHackCompatible: Boolean = + try { + val loader = getClass.getClassLoader + loader.loadClass("io.circe.BiggerDecimalJsonNumber") + loader.loadClass("io.circe.JsonDecimal") + loader.loadClass("io.circe.JsonBiggerDecimal") + loader.loadClass("io.circe.JsonBigDecimal") + loader.loadClass("io.circe.JsonLong") + loader.loadClass("io.circe.JsonDouble") + loader.loadClass("io.circe.JsonFloat") + true + } catch { + case _: ClassNotFoundException => false + } } diff --git a/modules/circe/src/main/scala/tethys/circe/ast/CirceSupport.scala b/modules/circe/src/main/scala/tethys/circe/ast/CirceSupport.scala index d9456ff0..e5b286f9 100644 --- a/modules/circe/src/main/scala/tethys/circe/ast/CirceSupport.scala +++ b/modules/circe/src/main/scala/tethys/circe/ast/CirceSupport.scala @@ -8,59 +8,73 @@ import tethys.{JsonObjectWriter, JsonReader, JsonWriter} import tethys.writers.tokens.TokenWriter trait CirceSupport { - implicit lazy val circeJsonObjectWriter: JsonWriter[JsonObject] = new JsonObjectWriter[JsonObject] { - def writeValues(value: JsonObject, writer: TokenWriter): Unit = { - val folder = new TethysJsonFolder(writer) - val it = value.toIterable.iterator - while (it.hasNext) { - val (k, v) = it.next() - - writer.writeFieldName(k) - v.foldWith(folder) + implicit lazy val circeJsonObjectWriter: JsonWriter[JsonObject] = + new JsonObjectWriter[JsonObject] { + def writeValues(value: JsonObject, writer: TokenWriter): Unit = { + val folder = new TethysJsonFolder(writer) + val it = value.toIterable.iterator + while (it.hasNext) { + val (k, v) = it.next() + + writer.writeFieldName(k) + v.foldWith(folder) + } } } - } implicit lazy val circeJsonWriter: JsonWriter[Json] = new JsonWriter[Json] { - def write(value: Json, writer: TokenWriter): Unit = value.foldWith(new TethysJsonFolder(writer)) + def write(value: Json, writer: TokenWriter): Unit = + value.foldWith(new TethysJsonFolder(writer)) } - implicit lazy val circeJsonObjectReader: JsonReader[JsonObject] = new JsonReader[JsonObject] { - def read(it: TokenIterator)(implicit fieldName: FieldName): JsonObject = - if (!it.currentToken().isObjectStart) ReaderError.wrongJson(s"Expected object start but found: ${it.currentToken()}") - else { - it.next() - - var builder = ArrayBuffer.newBuilder[(String, Json)] - while (!it.currentToken().isObjectEnd) { - val token = it.currentToken() - if (token.isFieldName) { - val name = it.fieldName() - val value = circeJsonReader.read(it.next())(fieldName.appendFieldName(name)) - - builder += ((name, value)) + implicit lazy val circeJsonObjectReader: JsonReader[JsonObject] = + new JsonReader[JsonObject] { + def read(it: TokenIterator)(implicit fieldName: FieldName): JsonObject = + if (!it.currentToken().isObjectStart) + ReaderError.wrongJson( + s"Expected object start but found: ${it.currentToken()}" + ) + else { + it.next() + + var builder = ArrayBuffer.newBuilder[(String, Json)] + while (!it.currentToken().isObjectEnd) { + val token = it.currentToken() + if (token.isFieldName) { + val name = it.fieldName() + val value = + circeJsonReader.read(it.next())(fieldName.appendFieldName(name)) + + builder += ((name, value)) + } else + ReaderError.wrongJson( + s"Expect end of object or field name but '$token' found" + )(fieldName) } - else ReaderError.wrongJson(s"Expect end of object or field name but '$token' found")(fieldName) - } - it.next() + it.next() - JsonObject.fromIterable(builder.result) - } - } + JsonObject.fromIterable(builder.result) + } + } implicit lazy val circeJsonReader: JsonReader[Json] = new JsonReader[Json] { def read(it: TokenIterator)(implicit fieldName: FieldName): Json = { val token = it.currentToken() - if (token.isObjectStart) Json.fromJsonObject(circeJsonObjectReader.read(it)) - else if (token.isArrayStart) Json.fromValues(JsonReader[Vector[Json]].read(it)) - else if (token.isStringValue) Json.fromString(JsonReader.stringReader.read(it)) - else if (token.isBooleanValue) Json.fromBoolean(JsonReader.booleanReader.read(it)) - else if (token.isNumberValue) JsonReader.numberReader.read(it) match { - case x@(_: java.lang.Byte | _: java.lang.Short | _: java.lang.Long) => Json.fromLong(x.longValue) - case x: java.lang.Integer => Json.fromInt(x) - case x: java.lang.Float => Json.fromFloatOrNull(x) - case x: java.lang.Double => Json.fromDoubleOrNull(x) + if (token.isObjectStart) + Json.fromJsonObject(circeJsonObjectReader.read(it)) + else if (token.isArrayStart) + Json.fromValues(JsonReader[Vector[Json]].read(it)) + else if (token.isStringValue) + Json.fromString(JsonReader.stringReader.read(it)) + else if (token.isBooleanValue) + Json.fromBoolean(JsonReader.booleanReader.read(it)) + else if (token.isNumberValue) JsonReader.numberReader.read(it) match { + case x @ (_: java.lang.Byte | _: java.lang.Short | _: java.lang.Long) => + Json.fromLong(x.longValue) + case x: java.lang.Integer => Json.fromInt(x) + case x: java.lang.Float => Json.fromFloatOrNull(x) + case x: java.lang.Double => Json.fromDoubleOrNull(x) case x: java.math.BigInteger => Json.fromBigInt(x) case x: BigInt => Json.fromBigInt(x) @@ -69,12 +83,14 @@ trait CirceSupport { case x: BigDecimal => Json.fromBigDecimal(x) case x => Json.fromBigDecimal(x.doubleValue) } - else if (token.isNullValue) { it.next(); Json.Null } + else if (token.isNullValue) { it.next(); Json.Null } else ReaderError.wrongJson(s"Unexpected token found: $token")(fieldName) } } - private[this] class TethysJsonFolder(writer: TokenWriter) extends Json.Folder[Unit] with JsonNumberHack { + private[this] class TethysJsonFolder(writer: TokenWriter) + extends Json.Folder[Unit] + with JsonNumberHack { def onNull: Unit = writer.writeNull() def onBoolean(value: Boolean): Unit = writer.writeBoolean(value) def onNumber(value: JsonNumber): Unit = writeNumber(value, writer) diff --git a/modules/circe/src/test/scala/tethys/circe/CirceSupportTest.scala b/modules/circe/src/test/scala/tethys/circe/CirceSupportTest.scala index c49085b2..84092d8b 100644 --- a/modules/circe/src/test/scala/tethys/circe/CirceSupportTest.scala +++ b/modules/circe/src/test/scala/tethys/circe/CirceSupportTest.scala @@ -23,7 +23,7 @@ class CirceSupportTest extends AnyFlatSpec with Matchers { } it should "parse Double" in { - token(100.0D).tokensAs[Json] shouldBe Json.fromDoubleOrNull(100.0D) + token(100.0d).tokensAs[Json] shouldBe Json.fromDoubleOrNull(100.0d) } it should "parse BigInt" in { @@ -31,7 +31,9 @@ class CirceSupportTest extends AnyFlatSpec with Matchers { } it should "parse BigDecimal" in { - token(BigDecimal(100.0D)).tokensAs[Json] shouldBe Json.fromBigDecimal(100.0D) + token(BigDecimal(100.0d)).tokensAs[Json] shouldBe Json.fromBigDecimal( + 100.0d + ) } it should "parse String" in { @@ -52,7 +54,9 @@ class CirceSupportTest extends AnyFlatSpec with Matchers { it should "parse Array" in { arr(1, 2L, 3).tokensAs[Json] shouldBe - Json.fromValues(List(Json.fromLong(1L), Json.fromLong(2L), Json.fromLong(3L))) + Json.fromValues( + List(Json.fromLong(1L), Json.fromLong(2L), Json.fromLong(3L)) + ) } it should "parse JsonObject" in { @@ -72,13 +76,15 @@ class CirceSupportTest extends AnyFlatSpec with Matchers { } it should "parse Array of JsonObject" in { - arr(obj("a" -> "b"), obj("c" -> "d")).tokensAs[Json] shouldBe Json.fromValues(List( - Json.fromJsonObject(JsonObject("a" -> Json.fromString("b"))), - Json.fromJsonObject(JsonObject("c" -> Json.fromString("d"))) - )) + arr(obj("a" -> "b"), obj("c" -> "d")) + .tokensAs[Json] shouldBe Json.fromValues( + List( + Json.fromJsonObject(JsonObject("a" -> Json.fromString("b"))), + Json.fromJsonObject(JsonObject("c" -> Json.fromString("d"))) + ) + ) } - behavior of "Circe ast JsonWriter" it should "write Int" in { @@ -94,19 +100,21 @@ class CirceSupportTest extends AnyFlatSpec with Matchers { } it should "write Double" in { - Json.fromDouble(100.0D).asTokenList shouldBe token(100.0D) + Json.fromDouble(100.0d).asTokenList shouldBe token(100.0d) } it should "write BigInt" in { Json.fromBigInt(BigInt("10000000000")).asTokenList match { case DoubleValueNode(d) :: Nil => d shouldBe 1.0e10 // 2.11 only behavior - case LongValueNode(l) :: Nil => l shouldBe 10000000000L - case _ => fail() + case LongValueNode(l) :: Nil => l shouldBe 10000000000L + case _ => fail() } } it should "write BigDecimal" in { - Json.fromBigDecimal(BigDecimal(100.0D)).asTokenList shouldBe token(BigDecimal(100.0D)) + Json.fromBigDecimal(BigDecimal(100.0d)).asTokenList shouldBe token( + BigDecimal(100.0d) + ) } it should "write String" in { @@ -126,11 +134,15 @@ class CirceSupportTest extends AnyFlatSpec with Matchers { } it should "write Array" in { - Json.fromValues(List( - Json.fromInt(1), - Json.fromInt(2), - Json.fromInt(3) - )).asTokenList shouldBe arr(1L, 2L, 3L) + Json + .fromValues( + List( + Json.fromInt(1), + Json.fromInt(2), + Json.fromInt(3) + ) + ) + .asTokenList shouldBe arr(1L, 2L, 3L) } it should "write JsonObject" in { diff --git a/modules/core/src/main/scala-2.13+/tethys/compat/CollectionBuilder.scala b/modules/core/src/main/scala-2.13+/tethys/compat/CollectionBuilder.scala index 7e9bd8e6..92c9856a 100644 --- a/modules/core/src/main/scala-2.13+/tethys/compat/CollectionBuilder.scala +++ b/modules/core/src/main/scala-2.13+/tethys/compat/CollectionBuilder.scala @@ -1,6 +1,11 @@ package tethys.compat -import scala.collection.{IterableFactory, IterableFactoryDefaults, MapFactory, mutable} +import scala.collection.{ + IterableFactory, + IterableFactoryDefaults, + MapFactory, + mutable +} import scala.language.experimental.macros import scala.language.higherKinds import scala.reflect.macros.blackbox @@ -11,29 +16,43 @@ trait CollectionBuilder[A, C] { object CollectionBuilder { - final class IterableFactoryCollectionBuilder[A, C[_]](factory: IterableFactory[C]) extends CollectionBuilder[A, C[A]] { + final class IterableFactoryCollectionBuilder[A, C[_]]( + factory: IterableFactory[C] + ) extends CollectionBuilder[A, C[A]] { override def newBuilder: mutable.Builder[A, C[A]] = factory.newBuilder[A] } - final class MapFactoryCollectionBuilder[K, V, M[_, _]](factory: MapFactory[M]) extends CollectionBuilder[(K, V), M[K, V]] { - override def newBuilder: mutable.Builder[(K, V), M[K, V]] = factory.newBuilder[K, V] + final class MapFactoryCollectionBuilder[K, V, M[_, _]](factory: MapFactory[M]) + extends CollectionBuilder[(K, V), M[K, V]] { + override def newBuilder: mutable.Builder[(K, V), M[K, V]] = + factory.newBuilder[K, V] } - implicit def iterableFactoryCollectionBuilder[A, C[X] <: IterableFactoryDefaults[X, C]]: IterableFactoryCollectionBuilder[A, C] = macro CollectionBuilderMacroImpl.fromIterableFactory[A, C] - implicit def mapFactoryCollectionBuilder[K, V, M[X, Y] <: Map[X, Y]]: MapFactoryCollectionBuilder[K, V, M] = macro CollectionBuilderMacroImpl.fromMapFactory[K, V, M] + implicit def iterableFactoryCollectionBuilder[A, C[ + X + ] <: IterableFactoryDefaults[X, C]] + : IterableFactoryCollectionBuilder[A, C] = macro + CollectionBuilderMacroImpl.fromIterableFactory[A, C] + implicit def mapFactoryCollectionBuilder[K, V, M[X, Y] <: Map[X, Y]] + : MapFactoryCollectionBuilder[K, V, M] = macro + CollectionBuilderMacroImpl.fromMapFactory[K, V, M] private class CollectionBuilderMacroImpl(val c: blackbox.Context) { import c.universe._ - def fromIterableFactory[A, C[X] <: IterableFactoryDefaults[X, C]](implicit A: WeakTypeTag[A], C: WeakTypeTag[C[A]]): Tree = { + def fromIterableFactory[A, C[X] <: IterableFactoryDefaults[X, C]](implicit + A: WeakTypeTag[A], + C: WeakTypeTag[C[A]] + ): Tree = { val ref = C.tpe.typeSymbol.companion q"new tethys.compat.CollectionBuilder.IterableFactoryCollectionBuilder[${A.tpe}, ${C.tpe}]($ref)" } def fromMapFactory[K, V, M[X, Y] <: Map[X, Y]](implicit - K: WeakTypeTag[K], - V: WeakTypeTag[V], - M: WeakTypeTag[M[K, V]]): Tree = { + K: WeakTypeTag[K], + V: WeakTypeTag[V], + M: WeakTypeTag[M[K, V]] + ): Tree = { val ref = M.tpe.typeSymbol.companion q"new tethys.compat.CollectionBuilder.MapFactoryCollectionBuilder[${K.tpe}, ${V.tpe}, ${M.tpe}]($ref)" } diff --git a/modules/core/src/main/scala-3/tethys/compat/CollectionBuilder.scala b/modules/core/src/main/scala-3/tethys/compat/CollectionBuilder.scala index 2352c923..79eda053 100644 --- a/modules/core/src/main/scala-3/tethys/compat/CollectionBuilder.scala +++ b/modules/core/src/main/scala-3/tethys/compat/CollectionBuilder.scala @@ -8,33 +8,55 @@ trait CollectionBuilder[A, C] { } object CollectionBuilder { - final class IterableFactoryCollectionBuilder[A, C[_]](factory: IterableFactory[C]) extends CollectionBuilder[A, C[A]] { + final class IterableFactoryCollectionBuilder[A, C[_]]( + factory: IterableFactory[C] + ) extends CollectionBuilder[A, C[A]] { def newBuilder: mutable.Builder[A, C[A]] = factory.newBuilder[A] } - final class MapFactoryCollectionBuilder[K, V, M[_, _]](factory: MapFactory[M]) extends CollectionBuilder[(K, V), M[K, V]] { + final class MapFactoryCollectionBuilder[K, V, M[_, _]](factory: MapFactory[M]) + extends CollectionBuilder[(K, V), M[K, V]] { def newBuilder: mutable.Builder[(K, V), M[K, V]] = factory.newBuilder[K, V] } - inline given iterableFactoryCollectionBuilder[A, C[X] <: Iterable[X]]: CollectionBuilder[A, C[A]] = - ${CollectionBuilderMacroImpl.fromIterableFactory[A, C]} + inline given iterableFactoryCollectionBuilder[A, C[X] <: Iterable[X]] + : CollectionBuilder[A, C[A]] = + ${ CollectionBuilderMacroImpl.fromIterableFactory[A, C] } - inline given mapFactoryCollectionBuilder[K, V, M[X, Y] <: Map[X, Y]]: MapFactoryCollectionBuilder[K, V, M] = - ${CollectionBuilderMacroImpl.fromMapFactory[K, V, M]} + inline given mapFactoryCollectionBuilder[K, V, M[X, Y] <: Map[X, Y]] + : MapFactoryCollectionBuilder[K, V, M] = + ${ CollectionBuilderMacroImpl.fromMapFactory[K, V, M] } object CollectionBuilderMacroImpl { - def fromIterableFactory[A: Type, C[X] <: Iterable[X]: Type](using Quotes): Expr[IterableFactoryCollectionBuilder[A, C]] = { + def fromIterableFactory[A: Type, C[X] <: Iterable[X]: Type](using + Quotes + ): Expr[IterableFactoryCollectionBuilder[A, C]] = { import quotes.reflect.* - val factory = Ref(TypeRepr.of[C].typeSymbol.companionModule).asExprOf[IterableFactory[C]] - '{new tethys.compat.CollectionBuilder.IterableFactoryCollectionBuilder[A, C]($factory)} + val factory = Ref(TypeRepr.of[C].typeSymbol.companionModule) + .asExprOf[IterableFactory[C]] + '{ + new tethys.compat.CollectionBuilder.IterableFactoryCollectionBuilder[ + A, + C + ]($factory) + } } - def fromMapFactory[K: Type, V: Type, M[X, Y] <: Map[X, Y]: Type](using Quotes): Expr[MapFactoryCollectionBuilder[K, V, M]] = { + def fromMapFactory[K: Type, V: Type, M[X, Y] <: Map[X, Y]: Type](using + Quotes + ): Expr[MapFactoryCollectionBuilder[K, V, M]] = { import quotes.reflect.* - val factory = Ref(TypeRepr.of[M].typeSymbol.companionModule).asExprOf[MapFactory[M]] - '{new tethys.compat.CollectionBuilder.MapFactoryCollectionBuilder[K, V, M]($factory)} + val factory = + Ref(TypeRepr.of[M].typeSymbol.companionModule).asExprOf[MapFactory[M]] + '{ + new tethys.compat.CollectionBuilder.MapFactoryCollectionBuilder[ + K, + V, + M + ]($factory) + } } } -} \ No newline at end of file +} diff --git a/modules/core/src/main/scala/tethys/JsonObjectWriter.scala b/modules/core/src/main/scala/tethys/JsonObjectWriter.scala index ad8fbc72..6e4543f7 100644 --- a/modules/core/src/main/scala/tethys/JsonObjectWriter.scala +++ b/modules/core/src/main/scala/tethys/JsonObjectWriter.scala @@ -16,25 +16,31 @@ trait JsonObjectWriter[A] extends JsonWriter[A] { def ++(that: JsonObjectWriter[A]): JsonObjectWriter[A] = concat(that) - def concat(that: JsonObjectWriter[A]): JsonObjectWriter[A] = new JsonObjectWriter[A] { - override def writeValues(value: A, tokenWriter: TokenWriter): Unit = { - self.writeValues(value, tokenWriter) - that.writeValues(value, tokenWriter) + def concat(that: JsonObjectWriter[A]): JsonObjectWriter[A] = + new JsonObjectWriter[A] { + override def writeValues(value: A, tokenWriter: TokenWriter): Unit = { + self.writeValues(value, tokenWriter) + that.writeValues(value, tokenWriter) + } } - } - override def contramap[B](fun: B => A): JsonObjectWriter[B] = new JsonObjectWriter[B] { - override def writeValues(value: B, tokenWriter: TokenWriter): Unit = - self.writeValues(fun(value), tokenWriter) - } + override def contramap[B](fun: B => A): JsonObjectWriter[B] = + new JsonObjectWriter[B] { + override def writeValues(value: B, tokenWriter: TokenWriter): Unit = + self.writeValues(fun(value), tokenWriter) + } } object JsonObjectWriter extends LowPriorityJsonObjectWriters { - def apply[A](implicit jsonObjectWriter: JsonObjectWriter[A]): JsonObjectWriter[A] = jsonObjectWriter + def apply[A](implicit + jsonObjectWriter: JsonObjectWriter[A] + ): JsonObjectWriter[A] = jsonObjectWriter } private[tethys] trait LowPriorityJsonObjectWriters { - implicit final def lowPriorityWriter[A](implicit lowPriorityInstance: LowPriorityInstance[JsonObjectWriter[A]]): JsonObjectWriter[A] = { + implicit final def lowPriorityWriter[A](implicit + lowPriorityInstance: LowPriorityInstance[JsonObjectWriter[A]] + ): JsonObjectWriter[A] = { lowPriorityInstance.instance } -} \ No newline at end of file +} diff --git a/modules/core/src/main/scala/tethys/JsonReader.scala b/modules/core/src/main/scala/tethys/JsonReader.scala index 0fe0b174..bb6c82ca 100644 --- a/modules/core/src/main/scala/tethys/JsonReader.scala +++ b/modules/core/src/main/scala/tethys/JsonReader.scala @@ -12,12 +12,15 @@ trait JsonReader[@specialized(specializations) A] { def read(it: TokenIterator)(implicit fieldName: FieldName): A def map[B](fun: A => B): JsonReader[B] = new JsonReader[B] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): B = fun(self.read(it)) + override def read(it: TokenIterator)(implicit fieldName: FieldName): B = + fun(self.read(it)) } - def mapWithField[B](fun: FieldName => A => B): JsonReader[B] = new JsonReader[B] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): B = fun(fieldName)(self.read(it)) - } + def mapWithField[B](fun: FieldName => A => B): JsonReader[B] = + new JsonReader[B] { + override def read(it: TokenIterator)(implicit fieldName: FieldName): B = + fun(fieldName)(self.read(it)) + } } object JsonReader extends AllJsonReaders { diff --git a/modules/core/src/main/scala/tethys/JsonStreaming.scala b/modules/core/src/main/scala/tethys/JsonStreaming.scala index fe6b469a..3f95e949 100644 --- a/modules/core/src/main/scala/tethys/JsonStreaming.scala +++ b/modules/core/src/main/scala/tethys/JsonStreaming.scala @@ -6,9 +6,13 @@ import tethys.writers.tokens.TokenWriter object JsonStreaming { - def streamValue(from: TokenIterator, to: TokenWriter)(implicit fieldName: FieldName): Unit = writeCurrentValue(from, to) + def streamValue(from: TokenIterator, to: TokenWriter)(implicit + fieldName: FieldName + ): Unit = writeCurrentValue(from, to) - private def writeCurrentValue(it: TokenIterator, writer: TokenWriter)(implicit fieldName: FieldName): Unit = { + private def writeCurrentValue(it: TokenIterator, writer: TokenWriter)(implicit + fieldName: FieldName + ): Unit = { val token = it.currentToken() if (token.isArrayStart) writeArray(it, writer) else if (token.isObjectStart) writeObject(it, writer) @@ -20,7 +24,9 @@ object JsonStreaming { it.next() } - private def writeArray(it: TokenIterator, writer: TokenWriter)(implicit fieldName: FieldName): Unit = { + private def writeArray(it: TokenIterator, writer: TokenWriter)(implicit + fieldName: FieldName + ): Unit = { it.next() writer.writeArrayStart() var index: Int = 0 @@ -31,12 +37,14 @@ object JsonStreaming { writer.writeArrayEnd() } - private def writeObject(it: TokenIterator, writer: TokenWriter)(implicit fieldName: FieldName): Unit = { + private def writeObject(it: TokenIterator, writer: TokenWriter)(implicit + fieldName: FieldName + ): Unit = { it.next() writer.writeObjectStart() while (!it.currentToken().isObjectEnd) { val token = it.currentToken() - if(token.isFieldName) { + if (token.isFieldName) { val name = it.fieldName() writer.writeFieldName(name) writeCurrentValue(it.next(), writer)(fieldName.appendFieldName(name)) diff --git a/modules/core/src/main/scala/tethys/JsonWriter.scala b/modules/core/src/main/scala/tethys/JsonWriter.scala index 205263a7..5bb361b5 100644 --- a/modules/core/src/main/scala/tethys/JsonWriter.scala +++ b/modules/core/src/main/scala/tethys/JsonWriter.scala @@ -16,7 +16,11 @@ trait JsonWriter[@specialized(specializations) A] { def write(value: A, tokenWriter: TokenWriter): Unit def contramap[B](fun: B => A): JsonWriter[B] = new JsonWriter[B] { - override def write(name: String, value: B, tokenWriter: TokenWriter): Unit = { + override def write( + name: String, + value: B, + tokenWriter: TokenWriter + ): Unit = { self.write(name, fun(value), tokenWriter) } diff --git a/modules/core/src/main/scala/tethys/commons/RawJson.scala b/modules/core/src/main/scala/tethys/commons/RawJson.scala index f6521d22..26b40093 100644 --- a/modules/core/src/main/scala/tethys/commons/RawJson.scala +++ b/modules/core/src/main/scala/tethys/commons/RawJson.scala @@ -11,11 +11,16 @@ final case class RawJson(json: String) object RawJson { implicit val rawJsonWriter: JsonWriter[RawJson] = new JsonWriter[RawJson] { - override def write(value: RawJson, tokenWriter: TokenWriter): Unit = tokenWriter.writeRawJson(value.json) + override def write(value: RawJson, tokenWriter: TokenWriter): Unit = + tokenWriter.writeRawJson(value.json) } - implicit def rawJsonReader(implicit tokenWriterProducer: TokenWriterProducer): JsonReader[RawJson] = new JsonReader[RawJson] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): RawJson = { + implicit def rawJsonReader(implicit + tokenWriterProducer: TokenWriterProducer + ): JsonReader[RawJson] = new JsonReader[RawJson] { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): RawJson = { val stringWriter = new StringWriter() val tokenWriter: TokenWriter = tokenWriterProducer.forWriter(stringWriter) JsonStreaming.streamValue(it, tokenWriter) diff --git a/modules/core/src/main/scala/tethys/commons/TokenNode.scala b/modules/core/src/main/scala/tethys/commons/TokenNode.scala index 018313a2..dcd4015a 100644 --- a/modules/core/src/main/scala/tethys/commons/TokenNode.scala +++ b/modules/core/src/main/scala/tethys/commons/TokenNode.scala @@ -56,10 +56,9 @@ object TokenNode { override val token: Token = NumberValueToken } - def obj(fields: (String, Any)*): List[TokenNode] = { - val tokens = fields.toList.flatMap { - case (name, a) => FieldNameNode(name) :: anyToTokens(a) + val tokens = fields.toList.flatMap { case (name, a) => + FieldNameNode(name) :: anyToTokens(a) } ObjectStartNode :: tokens ::: ObjectEndNode :: Nil @@ -77,30 +76,34 @@ object TokenNode { def value(v: Float): List[TokenNode] = FloatValueNode(v) :: Nil def value(v: Double): List[TokenNode] = DoubleValueNode(v) :: Nil def value(v: BigInt): List[TokenNode] = NumberValueNode(v) :: Nil - def value(v: java.math.BigInteger): List[TokenNode] = NumberValueNode(v) :: Nil + def value(v: java.math.BigInteger): List[TokenNode] = + NumberValueNode(v) :: Nil def value(v: BigDecimal): List[TokenNode] = NumberValueNode(v) :: Nil - def value(v: java.math.BigDecimal): List[TokenNode] = NumberValueNode(v) :: Nil + def value(v: java.math.BigDecimal): List[TokenNode] = + NumberValueNode(v) :: Nil private def anyToTokens(any: Any): List[TokenNode] = any match { - case v: TokenNode => v :: Nil - case nodes: List[_] => nodes.flatMap(anyToTokens) - case v: String => value(v) - case v: Short => value(v) - case v: Int => value(v) - case v: Long => value(v) + case v: TokenNode => v :: Nil + case nodes: List[_] => nodes.flatMap(anyToTokens) + case v: String => value(v) + case v: Short => value(v) + case v: Int => value(v) + case v: Long => value(v) case v: java.math.BigInteger => value(v) - case v: BigInt => value(v) - case v: Double => value(v) - case v: Float => value(v) + case v: BigInt => value(v) + case v: Double => value(v) + case v: Float => value(v) case v: java.math.BigDecimal => value(v) - case v: BigDecimal => value(v) - case v: Boolean => value(v) - case null | None => NullValueNode :: Nil - case v => throw new Exception(s"Can't auto wrap '$v'") + case v: BigDecimal => value(v) + case v: Boolean => value(v) + case null | None => NullValueNode :: Nil + case v => throw new Exception(s"Can't auto wrap '$v'") } implicit class TokenNodesOps(val json: String) extends AnyVal { - def jsonAsTokensList(implicit producer: TokenIteratorProducer): List[TokenNode] = { + def jsonAsTokensList(implicit + producer: TokenIteratorProducer + ): List[TokenNode] = { import tethys._ val iterator = json.toTokenIterator.fold(throw _, identity) val builder = List.newBuilder[TokenNode] @@ -115,12 +118,12 @@ object TokenNode { else if (token.isFieldName) FieldNameNode(iterator.fieldName()) else if (token.isStringValue) StringValueNode(iterator.string()) else if (token.isNumberValue) iterator.number() match { - case v: java.lang.Short => ShortValueNode(v) + case v: java.lang.Short => ShortValueNode(v) case v: java.lang.Integer => IntValueNode(v) - case v: java.lang.Long => LongValueNode(v) - case v: java.lang.Float => FloatValueNode(v) - case v: java.lang.Double => DoubleValueNode(v) - case n => NumberValueNode(n) + case v: java.lang.Long => LongValueNode(v) + case v: java.lang.Float => FloatValueNode(v) + case v: java.lang.Double => DoubleValueNode(v) + case n => NumberValueNode(n) } else BooleanValueNode(iterator.boolean()) } @@ -133,8 +136,10 @@ object TokenNode { } } - implicit class TokenListOps(private val tokens: Seq[TokenNode]) extends AnyVal { + implicit class TokenListOps(private val tokens: Seq[TokenNode]) + extends AnyVal { import tethys.TokenIteratorOps - def tokensAs[A: JsonReader]: A = QueueIterator(tokens).readJson[A].fold(throw _, identity) + def tokensAs[A: JsonReader]: A = + QueueIterator(tokens).readJson[A].fold(throw _, identity) } } diff --git a/modules/core/src/main/scala/tethys/package.scala b/modules/core/src/main/scala/tethys/package.scala index c525c981..0dfdb4bb 100644 --- a/modules/core/src/main/scala/tethys/package.scala +++ b/modules/core/src/main/scala/tethys/package.scala @@ -8,59 +8,86 @@ import scala.Specializable.Group package object tethys { - final val specializations = new Group((Short, Int, Long, Float, Double, Boolean)) + final val specializations = new Group( + (Short, Int, Long, Float, Double, Boolean) + ) // given implicit class JsonWriterOps[A](val a: A) extends AnyVal { - def asJson(implicit jsonWriter: JsonWriter[A], tokenWriterProducer: TokenWriterProducer): String = { + def asJson(implicit + jsonWriter: JsonWriter[A], + tokenWriterProducer: TokenWriterProducer + ): String = { val stringWriter = new StringWriter() writeJson(tokenWriterProducer.forWriter(stringWriter)) stringWriter.toString } - def asJsonWith(jsonWriter: JsonWriter[A])(implicit tokenWriterProducer: TokenWriterProducer): String = { + def asJsonWith( + jsonWriter: JsonWriter[A] + )(implicit tokenWriterProducer: TokenWriterProducer): String = { asJson(jsonWriter, tokenWriterProducer) } - def writeJson(tokenWriter: TokenWriter)(implicit jsonWriter: JsonWriter[A]): Unit = { - try jsonWriter.write(a, tokenWriter) finally { + def writeJson( + tokenWriter: TokenWriter + )(implicit jsonWriter: JsonWriter[A]): Unit = { + try jsonWriter.write(a, tokenWriter) + finally { tokenWriter.flush() } } } implicit class WriterOps(val w: Writer) extends AnyVal { - def toTokenWriter(implicit tokenWriterProducer: TokenWriterProducer): TokenWriter = tokenWriterProducer.forWriter(w) + def toTokenWriter(implicit + tokenWriterProducer: TokenWriterProducer + ): TokenWriter = tokenWriterProducer.forWriter(w) } implicit class StringReaderOps(val json: String) extends AnyVal { - def jsonAs[A](implicit jsonReader: JsonReader[A], producer: TokenIteratorProducer): Either[ReaderError, A] = { + def jsonAs[A](implicit + jsonReader: JsonReader[A], + producer: TokenIteratorProducer + ): Either[ReaderError, A] = { new StringReader(json).readJson[A] } - def toTokenIterator(implicit producer: TokenIteratorProducer): Either[ReaderError, TokenIterator] = { + def toTokenIterator(implicit + producer: TokenIteratorProducer + ): Either[ReaderError, TokenIterator] = { new StringReader(json).toTokenIterator } } implicit class ReaderReaderOps(val reader: Reader) extends AnyVal { - def readJson[A](implicit jsonReader: JsonReader[A], producer: TokenIteratorProducer): Either[ReaderError, A] = { + def readJson[A](implicit + jsonReader: JsonReader[A], + producer: TokenIteratorProducer + ): Either[ReaderError, A] = { implicit val root: FieldName = FieldName() producer.fromReader(reader).right.flatMap(_.readJson[A]) } - def readJsonWith[A](jsonReader: JsonReader[A])(implicit producer: TokenIteratorProducer): Either[ReaderError, A] = { + def readJsonWith[A]( + jsonReader: JsonReader[A] + )(implicit producer: TokenIteratorProducer): Either[ReaderError, A] = { readJson[A](jsonReader, producer) } - def toTokenIterator(implicit producer: TokenIteratorProducer): Either[ReaderError, TokenIterator] = { + def toTokenIterator(implicit + producer: TokenIteratorProducer + ): Either[ReaderError, TokenIterator] = { producer.fromReader(reader) } } - implicit class TokenIteratorOps(val tokenIterator: TokenIterator) extends AnyVal { - def readJson[A](implicit jsonReader: JsonReader[A]): Either[ReaderError, A] = { + implicit class TokenIteratorOps(val tokenIterator: TokenIterator) + extends AnyVal { + def readJson[A](implicit + jsonReader: JsonReader[A] + ): Either[ReaderError, A] = { implicit val fieldName: FieldName = FieldName() ReaderError.catchNonFatal(jsonReader.read(tokenIterator)) } diff --git a/modules/core/src/main/scala/tethys/readers/JsonReaderBuilder.scala b/modules/core/src/main/scala/tethys/readers/JsonReaderBuilder.scala index 83af97ef..beb94421 100644 --- a/modules/core/src/main/scala/tethys/readers/JsonReaderBuilder.scala +++ b/modules/core/src/main/scala/tethys/readers/JsonReaderBuilder.scala @@ -4,33 +4,71 @@ import tethys.JsonReader import tethys.readers.instances.{SelectingJsonReader, SimpleJsonReader} object JsonReaderBuilder { - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder1[B] = { - new JsonReaderBuilder1[B](0, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder1[B] = { + new JsonReaderBuilder1[B]( + 0, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder1[B] = { - new JsonReaderBuilder1[B](0, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder1[B] = { + new JsonReaderBuilder1[B]( + 0, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } trait SingleJsonValueReader[A1] { - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit private[JsonReaderBuilder] def value(extracted: Array[Any]): A1 } - final class JsonReaderBuilder1[A1] private[JsonReaderBuilder](pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A1]) extends SingleJsonValueReader[A1] { - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { - arr(pos) = SimpleJsonReader.FieldDefinition[A1](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): A1 = extracted(pos).asInstanceOf[A1] - - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder2[A1, B] = { + final class JsonReaderBuilder1[A1] private[JsonReaderBuilder] ( + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A1] + ) extends SingleJsonValueReader[A1] { + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { + arr(pos) = + SimpleJsonReader.FieldDefinition[A1](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value(extracted: Array[Any]): A1 = extracted( + pos + ).asInstanceOf[A1] + + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder2[A1, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder2[A1, B] = { - new JsonReaderBuilder2[A1, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder2[A1, B] = { + new JsonReaderBuilder2[A1, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } def buildReader[Res](fun: A1 => Res): JsonReader[Res] = { @@ -41,7 +79,10 @@ object JsonReaderBuilder { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: A1 => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: A1 => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) new SimpleJsonReader[Res](fieldsArray, arr => fun(value(arr)), strict) @@ -50,26 +91,48 @@ object JsonReaderBuilder { def selectReader[Res](fun: A1 => JsonReader[_ <: Res]): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[A1](fieldsArray, arr => value(arr), strict = false) + val simpleJsonReader = + new SimpleJsonReader[A1](fieldsArray, arr => value(arr), strict = false) new SelectingJsonReader[A1, Res](simpleJsonReader)(fun) } } - final class JsonReaderBuilder2[A1, A2] private[JsonReaderBuilder](prev: SingleJsonValueReader[A1], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A2]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder2[A1, A2] private[JsonReaderBuilder] ( + prev: SingleJsonValueReader[A1], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A2] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A2](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A2](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2) = (prev.value(extracted), extracted(pos).asInstanceOf[A2]) + private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2) = + (prev.value(extracted), extracted(pos).asInstanceOf[A2]) - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder3[A1, A2, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder3[A1, A2, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder3[A1, A2, B] = { - new JsonReaderBuilder3[A1, A2, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder3[A1, A2, B] = { + new JsonReaderBuilder3[A1, A2, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } def buildReader[Res](fun: (A1, A2) => Res): JsonReader[Res] = { @@ -80,37 +143,71 @@ object JsonReaderBuilder { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2)](fieldsArray, arr => value(arr), strict = false) + val simpleJsonReader = new SimpleJsonReader[(A1, A2)]( + fieldsArray, + arr => value(arr), + strict = false + ) new SelectingJsonReader[(A1, A2), Res](simpleJsonReader)(fun) } } - final class JsonReaderBuilder3[A1, A2, A3] private[JsonReaderBuilder](prev: JsonReaderBuilder2[A1, A2], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A3]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder3[A1, A2, A3] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder2[A1, A2], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A3] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A3](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A3](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3) = prev.value(extracted) match { - case (a1, a2) => (a1, a2, extracted(pos).asInstanceOf[A3]) - } + private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3) = + prev.value(extracted) match { + case (a1, a2) => (a1, a2, extracted(pos).asInstanceOf[A3]) + } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder4[A1, A2, A3, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder4[A1, A2, A3, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder4[A1, A2, A3, B] = { - new JsonReaderBuilder4[A1, A2, A3, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder4[A1, A2, A3, B] = { + new JsonReaderBuilder4[A1, A2, A3, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } def buildReader[Res](fun: (A1, A2, A3) => Res): JsonReader[Res] = { @@ -121,806 +218,4068 @@ object JsonReaderBuilder { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2, A3)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2, A3)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3)](fieldsArray, arr => value(arr), strict = false) + val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3)]( + fieldsArray, + arr => value(arr), + strict = false + ) new SelectingJsonReader[(A1, A2, A3), Res](simpleJsonReader)(fun) } } - final class JsonReaderBuilder4[A1, A2, A3, A4] private[JsonReaderBuilder](prev: JsonReaderBuilder3[A1, A2, A3], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A4]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder4[A1, A2, A3, A4] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder3[A1, A2, A3], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A4] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A4](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A4](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4) = prev.value(extracted) match { + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4) = prev.value(extracted) match { case (a1, a2, a3) => (a1, a2, a3, extracted(pos).asInstanceOf[A4]) } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder5[A1, A2, A3, A4, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder5[A1, A2, A3, A4, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder5[A1, A2, A3, A4, B] = { - new JsonReaderBuilder5[A1, A2, A3, A4, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder5[A1, A2, A3, A4, B] = { + new JsonReaderBuilder5[A1, A2, A3, A4, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } def buildReader[Res](fun: (A1, A2, A3, A4) => Res): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2, A3, A4)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2, A3, A4)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4)](fieldsArray, arr => value(arr), strict = false) + val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4)]( + fieldsArray, + arr => value(arr), + strict = false + ) new SelectingJsonReader[(A1, A2, A3, A4), Res](simpleJsonReader)(fun) } } - final class JsonReaderBuilder5[A1, A2, A3, A4, A5] private[JsonReaderBuilder](prev: JsonReaderBuilder4[A1, A2, A3, A4], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A5]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder5[ + A1, + A2, + A3, + A4, + A5 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder4[A1, A2, A3, A4], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A5] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A5](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A5](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5) = prev.value(extracted) match { + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5) = prev.value(extracted) match { case (a1, a2, a3, a4) => (a1, a2, a3, a4, extracted(pos).asInstanceOf[A5]) } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder6[A1, A2, A3, A4, A5, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder6[A1, A2, A3, A4, A5, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder6[A1, A2, A3, A4, A5, B] = { - new JsonReaderBuilder6[A1, A2, A3, A4, A5, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder6[A1, A2, A3, A4, A5, B] = { + new JsonReaderBuilder6[A1, A2, A3, A4, A5, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } def buildReader[Res](fun: (A1, A2, A3, A4, A5) => Res): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2, A3, A4, A5)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2, A3, A4, A5)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5)](fieldsArray, arr => value(arr), strict = false) + val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5)]( + fieldsArray, + arr => value(arr), + strict = false + ) new SelectingJsonReader[(A1, A2, A3, A4, A5), Res](simpleJsonReader)(fun) } } - final class JsonReaderBuilder6[A1, A2, A3, A4, A5, A6] private[JsonReaderBuilder](prev: JsonReaderBuilder5[A1, A2, A3, A4, A5], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A6]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder6[ + A1, + A2, + A3, + A4, + A5, + A6 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder5[A1, A2, A3, A4, A5], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A6] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A6](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A6](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5) => (a1, a2, a3, a4, a5, extracted(pos).asInstanceOf[A6]) + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6) = prev.value(extracted) match { + case (a1, a2, a3, a4, a5) => + (a1, a2, a3, a4, a5, extracted(pos).asInstanceOf[A6]) } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, B] = { - new JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, B] = { + new JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6) => Res): JsonReader[Res] = { + def buildReader[Res]( + fun: (A1, A2, A3, A4, A5, A6) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5, A6) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5, A6) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2, A3, A4, A5, A6)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6)]( + fieldsArray, + arr => value(arr), + strict = false + ) + new SelectingJsonReader[(A1, A2, A3, A4, A5, A6), Res](simpleJsonReader)( + fun + ) } } - final class JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, A7] private[JsonReaderBuilder](prev: JsonReaderBuilder6[A1, A2, A3, A4, A5, A6], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A7]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder7[ + A1, + A2, + A3, + A4, + A5, + A6, + A7 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder6[A1, A2, A3, A4, A5, A6], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A7] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A7](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A7](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6) => (a1, a2, a3, a4, a5, a6, extracted(pos).asInstanceOf[A7]) + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7) = prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6) => + (a1, a2, a3, a4, a5, a6, extracted(pos).asInstanceOf[A7]) } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, B] = { - new JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, B] = { + new JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7) => Res): JsonReader[Res] = { + def buildReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5, A6, A7) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2, A3, A4, A5, A6, A7)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7)]( + fieldsArray, + arr => value(arr), + strict = false + ) + new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7), Res]( + simpleJsonReader + )(fun) } } - final class JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, A8] private[JsonReaderBuilder](prev: JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, A7], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A8]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder8[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder7[A1, A2, A3, A4, A5, A6, A7], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A8] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A8](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A8](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7) => (a1, a2, a3, a4, a5, a6, a7, extracted(pos).asInstanceOf[A8]) + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8) = prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6, a7) => + (a1, a2, a3, a4, a5, a6, a7, extracted(pos).asInstanceOf[A8]) } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, B] = { - new JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, B] = { + new JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8) => Res): JsonReader[Res] = { + def buildReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5, A6, A7, A8) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2, A3, A4, A5, A6, A7, A8)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8), Res](simpleJsonReader)(fun) + val simpleJsonReader = + new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8)]( + fieldsArray, + arr => value(arr), + strict = false + ) + new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8), Res]( + simpleJsonReader + )(fun) } } - final class JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, A9] private[JsonReaderBuilder](prev: JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, A8], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A9]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder9[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder8[A1, A2, A3, A4, A5, A6, A7, A8], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A9] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A9](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A9](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8) => (a1, a2, a3, a4, a5, a6, a7, a8, extracted(pos).asInstanceOf[A9]) + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8, A9) = prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6, a7, a8) => + (a1, a2, a3, a4, a5, a6, a7, a8, extracted(pos).asInstanceOf[A9]) } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, B] = { - new JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, B] = { + new JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9) => Res): JsonReader[Res] = { + def buildReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9), Res](simpleJsonReader)(fun) + val simpleJsonReader = + new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9)]( + fieldsArray, + arr => value(arr), + strict = false + ) + new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9), Res]( + simpleJsonReader + )(fun) } } - final class JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10] private[JsonReaderBuilder](prev: JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, A9], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A10]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder10[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder9[A1, A2, A3, A4, A5, A6, A7, A8, A9], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A10] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A10](name, defaultValue, jsonReader) + arr(pos) = + SimpleJsonReader.FieldDefinition[A10](name, defaultValue, jsonReader) } - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, extracted(pos).asInstanceOf[A10]) + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) = prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6, a7, a8, a9) => + (a1, a2, a3, a4, a5, a6, a7, a8, a9, extracted(pos).asInstanceOf[A10]) } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B] = { - new JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B] = { + new JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) => Res): JsonReader[Res] = { + def buildReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) } - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)) => JsonReader[_ <: Res]): JsonReader[Res] = { + def selectReader[Res]( + fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), Res](simpleJsonReader)(fun) + val simpleJsonReader = + new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)]( + fieldsArray, + arr => value(arr), + strict = false + ) + new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), Res]( + simpleJsonReader + )(fun) } } - final class JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11] private[JsonReaderBuilder](prev: JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A11]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder11[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A11] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A11](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, extracted(pos).asInstanceOf[A11]) - } + arr(pos) = + SimpleJsonReader.FieldDefinition[A11](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) = + prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + extracted(pos).asInstanceOf[A11] + ) + } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, B] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, B] = { - new JsonReaderBuilder12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, B] = { + new JsonReaderBuilder12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, B]( + this, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) } - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Res): JsonReader[Res] = { + def buildReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), Res](simpleJsonReader)(fun) + val simpleJsonReader = + new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)]( + fieldsArray, + arr => value(arr), + strict = false + ) + new SelectingJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12] private[JsonReaderBuilder](prev: JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A12]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder12[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A12] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A12](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, extracted(pos).asInstanceOf[A12]) - } + arr(pos) = + SimpleJsonReader.FieldDefinition[A12](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) = + prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + extracted(pos).asInstanceOf[A12] + ) + } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder13[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, B] = { - new JsonReaderBuilder13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder13[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + B + ] = { + new JsonReaderBuilder13[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13] private[JsonReaderBuilder](prev: JsonReaderBuilder12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A13]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder13[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder12[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A13] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A13](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, extracted(pos).asInstanceOf[A13]) - } + arr(pos) = + SimpleJsonReader.FieldDefinition[A13](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) = + prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + extracted(pos).asInstanceOf[A13] + ) + } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder14[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, B] = { - new JsonReaderBuilder14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder14[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + B + ] = { + new JsonReaderBuilder14[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14] private[JsonReaderBuilder](prev: JsonReaderBuilder13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A14]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder14[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder13[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A14] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A14](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, extracted(pos).asInstanceOf[A14]) - } + arr(pos) = + SimpleJsonReader.FieldDefinition[A14](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) = + prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + extracted(pos).asInstanceOf[A14] + ) + } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder15[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B] = { - new JsonReaderBuilder15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder15[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + B + ] = { + new JsonReaderBuilder15[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15] private[JsonReaderBuilder](prev: JsonReaderBuilder14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A15]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder15[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder14[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A15] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A15](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, extracted(pos).asInstanceOf[A15]) - } + arr(pos) = + SimpleJsonReader.FieldDefinition[A15](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) = + prev.value(extracted) match { + case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + extracted(pos).asInstanceOf[A15] + ) + } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder16[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, B] = { - new JsonReaderBuilder16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder16[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + B + ] = { + new JsonReaderBuilder16[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16] private[JsonReaderBuilder](prev: JsonReaderBuilder15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A16]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder16[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder15[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A16] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A16](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, extracted(pos).asInstanceOf[A16]) - } + arr(pos) = + SimpleJsonReader.FieldDefinition[A16](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value( + extracted: Array[Any] + ): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) = + prev.value(extracted) match { + case ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15 + ) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + extracted(pos).asInstanceOf[A16] + ) + } - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, B] = { + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder17[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, B] = { - new JsonReaderBuilder17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder17[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + B + ] = { + new JsonReaderBuilder17[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16 + ) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17] private[JsonReaderBuilder](prev: JsonReaderBuilder16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A17]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder17[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder16[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A17] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A17](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, extracted(pos).asInstanceOf[A17]) - } - - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, B] = { + arr(pos) = + SimpleJsonReader.FieldDefinition[A17](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value(extracted: Array[Any]): ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ) = prev.value(extracted) match { + case ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16 + ) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + extracted(pos).asInstanceOf[A17] + ) + } + + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder18[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, B] = { - new JsonReaderBuilder18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder18[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + B + ] = { + new JsonReaderBuilder18[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18] private[JsonReaderBuilder](prev: JsonReaderBuilder17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A18]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder18[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder17[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A18] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A18](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, extracted(pos).asInstanceOf[A18]) - } - - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, B] = { + arr(pos) = + SimpleJsonReader.FieldDefinition[A18](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value(extracted: Array[Any]): ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ) = prev.value(extracted) match { + case ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17 + ) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + extracted(pos).asInstanceOf[A18] + ) + } + + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder19[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, B] = { - new JsonReaderBuilder19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder19[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + B + ] = { + new JsonReaderBuilder19[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19] private[JsonReaderBuilder](prev: JsonReaderBuilder18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A19]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder19[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder18[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A19] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A19](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, extracted(pos).asInstanceOf[A19]) - } - - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, B] = { + arr(pos) = + SimpleJsonReader.FieldDefinition[A19](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value(extracted: Array[Any]): ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ) = prev.value(extracted) match { + case ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + a18 + ) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + a18, + extracted(pos).asInstanceOf[A19] + ) + } + + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder20[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, B] = { - new JsonReaderBuilder20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder20[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + B + ] = { + new JsonReaderBuilder20[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20] private[JsonReaderBuilder](prev: JsonReaderBuilder19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A20]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder20[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder19[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A20] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A20](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, extracted(pos).asInstanceOf[A20]) - } - - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, B] = { + arr(pos) = + SimpleJsonReader.FieldDefinition[A20](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value(extracted: Array[Any]): ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ) = prev.value(extracted) match { + case ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + a18, + a19 + ) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + a18, + a19, + extracted(pos).asInstanceOf[A20] + ) + } + + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder21[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, B] = { - new JsonReaderBuilder21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder21[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + B + ] = { + new JsonReaderBuilder21[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21] private[JsonReaderBuilder](prev: JsonReaderBuilder20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A21]) { - - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + final class JsonReaderBuilder21[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder20[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A21] + ) { + + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A21](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, extracted(pos).asInstanceOf[A21]) - } - - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, B] = { + arr(pos) = + SimpleJsonReader.FieldDefinition[A21](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value(extracted: Array[Any]): ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ) = prev.value(extracted) match { + case ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + a18, + a19, + a20 + ) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + a18, + a19, + a20, + extracted(pos).asInstanceOf[A21] + ) + } + + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder22[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, B] = { - new JsonReaderBuilder22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, B](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) => Res): JsonReader[Res] = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder22[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + B + ] = { + new JsonReaderBuilder22[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + B + ](this, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ), + Res + ](simpleJsonReader)(fun) } } - final class JsonReaderBuilder22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22] private[JsonReaderBuilder](prev: JsonReaderBuilder21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21], pos: Int, name: String, defaultValue: Any, jsonReader: JsonReader[A22]) { + final class JsonReaderBuilder22[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ] private[JsonReaderBuilder] ( + prev: JsonReaderBuilder21[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21 + ], + pos: Int, + name: String, + defaultValue: Any, + jsonReader: JsonReader[A22] + ) { self => - private[JsonReaderBuilder] def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = { + private[JsonReaderBuilder] def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = { prev.fields(arr) - arr(pos) = SimpleJsonReader.FieldDefinition[A22](name, defaultValue, jsonReader) - } - - private[JsonReaderBuilder] def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22) = prev.value(extracted) match { - case (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21) => (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, extracted(pos).asInstanceOf[A22]) - } - - def addField[B](name: String, jsonReader: JsonReader[B])(implicit readerDefaultValue: JsonReaderDefaultValue[B]): JsonReaderBuilder2[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), B] = { + arr(pos) = + SimpleJsonReader.FieldDefinition[A22](name, defaultValue, jsonReader) + } + + private[JsonReaderBuilder] def value(extracted: Array[Any]): ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) = prev.value(extracted) match { + case ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + a18, + a19, + a20, + a21 + ) => + ( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12, + a13, + a14, + a15, + a16, + a17, + a18, + a19, + a20, + a21, + extracted(pos).asInstanceOf[A22] + ) + } + + def addField[B](name: String, jsonReader: JsonReader[B])(implicit + readerDefaultValue: JsonReaderDefaultValue[B] + ): JsonReaderBuilder2[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ), + B + ] = { addField[B](name)(readerDefaultValue, jsonReader) } - def addField[B](name: String)(implicit readerDefaultValue: JsonReaderDefaultValue[B], jsonReader: JsonReader[B]): JsonReaderBuilder2[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), B] = { - val singleJsonValueReader: SingleJsonValueReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)] = { - new SingleJsonValueReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)] { - private[JsonReaderBuilder] override def fields(arr: Array[SimpleJsonReader.FieldDefinition[_]]): Unit = self.fields(arr) - - override def value(extracted: Array[Any]): (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22) = { + def addField[B](name: String)(implicit + readerDefaultValue: JsonReaderDefaultValue[B], + jsonReader: JsonReader[B] + ): JsonReaderBuilder2[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ), + B + ] = { + val singleJsonValueReader: SingleJsonValueReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) + ] = { + new SingleJsonValueReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) + ] { + private[JsonReaderBuilder] override def fields( + arr: Array[SimpleJsonReader.FieldDefinition[_]] + ): Unit = self.fields(arr) + + override def value(extracted: Array[Any]): ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) = { self.value(extracted) } } } - new JsonReaderBuilder2[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), B](singleJsonValueReader, pos + 1, name, readerDefaultValue.defaultValue, jsonReader) - } - - def buildReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22) => Res): JsonReader[Res] = { + new JsonReaderBuilder2[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ), + B + ]( + singleJsonValueReader, + pos + 1, + name, + readerDefaultValue.defaultValue, + jsonReader + ) + } + + def buildReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) => Res + ): JsonReader[Res] = { buildReader(strict = false, fun) } - def buildStrictReader[Res](fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22) => Res): JsonReader[Res] = { + def buildStrictReader[Res]( + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) => Res + ): JsonReader[Res] = { buildReader(strict = true, fun) } - private def buildReader[Res](strict: Boolean, fun: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22) => Res): JsonReader[Res] = { + private def buildReader[Res]( + strict: Boolean, + fun: ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) => Res + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - new SimpleJsonReader[Res](fieldsArray, arr => fun.tupled(value(arr)), strict) - } - - def selectReader[Res](fun: ((A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)) => JsonReader[_ <: Res]): JsonReader[Res] = { + new SimpleJsonReader[Res]( + fieldsArray, + arr => fun.tupled(value(arr)), + strict + ) + } + + def selectReader[Res]( + fun: ( + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) + ) => JsonReader[_ <: Res] + ): JsonReader[Res] = { val fieldsArray = new Array[SimpleJsonReader.FieldDefinition[_]](pos + 1) fields(fieldsArray) - val simpleJsonReader = new SimpleJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)](fieldsArray, arr => value(arr), strict = false) - new SelectingJsonReader[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), Res](simpleJsonReader)(fun) + val simpleJsonReader = new SimpleJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ) + ](fieldsArray, arr => value(arr), strict = false) + new SelectingJsonReader[ + ( + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22 + ), + Res + ](simpleJsonReader)(fun) } } diff --git a/modules/core/src/main/scala/tethys/readers/JsonReaderDefaultValue.scala b/modules/core/src/main/scala/tethys/readers/JsonReaderDefaultValue.scala index 3bf62de6..ca402394 100644 --- a/modules/core/src/main/scala/tethys/readers/JsonReaderDefaultValue.scala +++ b/modules/core/src/main/scala/tethys/readers/JsonReaderDefaultValue.scala @@ -9,17 +9,21 @@ trait JsonReaderDefaultValue[A] { } object JsonReaderDefaultValue extends LowPriorityDefaultValue { - def apply[A](implicit dv: JsonReaderDefaultValue[A]): JsonReaderDefaultValue[A] = dv + def apply[A](implicit + dv: JsonReaderDefaultValue[A] + ): JsonReaderDefaultValue[A] = dv - //Allows easy access of default value in macro + // Allows easy access of default value in macro class ReaderDefaultValue(value: Any) extends StaticAnnotation @ReaderDefaultValue(None) class OptionDefaultValue[A] extends JsonReaderDefaultValue[Option[A]] { override def defaultValue: Any = None } - private val optionInstance: OptionDefaultValue[Nothing] = new OptionDefaultValue[Nothing] - implicit def optionDefaultValue[A]: OptionDefaultValue[A] = optionInstance.asInstanceOf[OptionDefaultValue[A]] + private val optionInstance: OptionDefaultValue[Nothing] = + new OptionDefaultValue[Nothing] + implicit def optionDefaultValue[A]: OptionDefaultValue[A] = + optionInstance.asInstanceOf[OptionDefaultValue[A]] } trait LowPriorityDefaultValue { @@ -28,6 +32,8 @@ trait LowPriorityDefaultValue { override def defaultValue: Any = null } - private val noDefaultValueInstance: NoDefaultValue[Nothing] = new NoDefaultValue[Nothing] - implicit def noDefaultValue[A]: NoDefaultValue[A] = noDefaultValueInstance.asInstanceOf[NoDefaultValue[A]] + private val noDefaultValueInstance: NoDefaultValue[Nothing] = + new NoDefaultValue[Nothing] + implicit def noDefaultValue[A]: NoDefaultValue[A] = + noDefaultValueInstance.asInstanceOf[NoDefaultValue[A]] } diff --git a/modules/core/src/main/scala/tethys/readers/KeyReader.scala b/modules/core/src/main/scala/tethys/readers/KeyReader.scala index c4814ff8..194f34d6 100644 --- a/modules/core/src/main/scala/tethys/readers/KeyReader.scala +++ b/modules/core/src/main/scala/tethys/readers/KeyReader.scala @@ -9,9 +9,12 @@ object KeyReader { override def read(s: String)(implicit fieldName: FieldName): String = s } - implicit lazy val uuidKeyReader: KeyReader[java.util.UUID] = new KeyReader[java.util.UUID] { - override def read(s: String)(implicit fieldName: FieldName): java.util.UUID = java.util.UUID.fromString(s) - } + implicit lazy val uuidKeyReader: KeyReader[java.util.UUID] = + new KeyReader[java.util.UUID] { + override def read(s: String)(implicit + fieldName: FieldName + ): java.util.UUID = java.util.UUID.fromString(s) + } implicit lazy val intKeyReader: KeyReader[Int] = new KeyReader[Int] { override def read(s: String)(implicit fieldName: FieldName): Int = s.toInt diff --git a/modules/core/src/main/scala/tethys/readers/ReaderError.scala b/modules/core/src/main/scala/tethys/readers/ReaderError.scala index beeb7901..bac4dce2 100644 --- a/modules/core/src/main/scala/tethys/readers/ReaderError.scala +++ b/modules/core/src/main/scala/tethys/readers/ReaderError.scala @@ -2,10 +2,16 @@ package tethys.readers import scala.util.control.NonFatal -final class ReaderError protected(message: String, cause: Throwable, field: String) extends Exception(message, cause) +final class ReaderError protected ( + message: String, + cause: Throwable, + field: String +) extends Exception(message, cause) object ReaderError { - def wrongJson(reason: String, cause: Throwable = null)(implicit fieldName: FieldName): Nothing = { + def wrongJson(reason: String, cause: Throwable = null)(implicit + fieldName: FieldName + ): Nothing = { val field = fieldName.value() throw new ReaderError( message = s"Illegal json at '$field': $reason", @@ -14,14 +20,20 @@ object ReaderError { ) } - def catchNonFatal[A](fun: => A)(implicit fieldName: FieldName): Either[ReaderError, A] = { - try Right(fun) catch { + def catchNonFatal[A]( + fun: => A + )(implicit fieldName: FieldName): Either[ReaderError, A] = { + try Right(fun) + catch { case err: ReaderError => Left(err) - case NonFatal(e) => Left(new ReaderError( - message = e.getMessage, - cause = e, - field = fieldName.value()) - ) + case NonFatal(e) => + Left( + new ReaderError( + message = e.getMessage, + cause = e, + field = fieldName.value() + ) + ) } } -} \ No newline at end of file +} diff --git a/modules/core/src/main/scala/tethys/readers/instances/AllJsonReaders.scala b/modules/core/src/main/scala/tethys/readers/instances/AllJsonReaders.scala index 19591382..b02d14c7 100644 --- a/modules/core/src/main/scala/tethys/readers/instances/AllJsonReaders.scala +++ b/modules/core/src/main/scala/tethys/readers/instances/AllJsonReaders.scala @@ -5,135 +5,175 @@ import tethys.readers.tokens.TokenIterator import tethys.readers.{FieldName, ReaderError} trait AllJsonReaders extends OptionReaders { - implicit lazy val booleanReader: JsonReader[Boolean] = new JsonReader[Boolean] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): Boolean = { - if(it.currentToken().isBooleanValue) { - val res = it.boolean() - it.next() - res - } else { - ReaderError.wrongJson(s"Expected boolean value but found: ${it.currentToken()}") + implicit lazy val booleanReader: JsonReader[Boolean] = + new JsonReader[Boolean] { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): Boolean = { + if (it.currentToken().isBooleanValue) { + val res = it.boolean() + it.next() + res + } else { + ReaderError.wrongJson( + s"Expected boolean value but found: ${it.currentToken()}" + ) + } } } - } implicit lazy val stringReader: JsonReader[String] = new JsonReader[String] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): String = { - if(it.currentToken().isStringValue) { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): String = { + if (it.currentToken().isStringValue) { val res = it.string() it.next() res } else { - ReaderError.wrongJson(s"Expected string value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected string value but found: ${it.currentToken()}" + ) } } } implicit lazy val numberReader: JsonReader[Number] = new JsonReader[Number] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): Number = { - if(it.currentToken().isNumberValue) { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): Number = { + if (it.currentToken().isNumberValue) { val res = it.number() it.next() res } else { - ReaderError.wrongJson(s"Expected number value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected number value but found: ${it.currentToken()}" + ) } } } implicit lazy val shortReader: JsonReader[Short] = new JsonReader[Short] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): Short = { - if(it.currentToken().isNumberValue) { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): Short = { + if (it.currentToken().isNumberValue) { val res = it.short() it.next() res } else { - ReaderError.wrongJson(s"Expected short value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected short value but found: ${it.currentToken()}" + ) } } } implicit lazy val intReader: JsonReader[Int] = new JsonReader[Int] { override def read(it: TokenIterator)(implicit fieldName: FieldName): Int = { - if(it.currentToken().isNumberValue) { + if (it.currentToken().isNumberValue) { val res = it.int() it.next() res } else { - ReaderError.wrongJson(s"Expected int value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected int value but found: ${it.currentToken()}" + ) } } } implicit lazy val longReader: JsonReader[Long] = new JsonReader[Long] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): Long = { - if(it.currentToken().isNumberValue) { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): Long = { + if (it.currentToken().isNumberValue) { val res = it.long() it.next() res } else { - ReaderError.wrongJson(s"Expected long value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected long value but found: ${it.currentToken()}" + ) } } } implicit lazy val floatReader: JsonReader[Float] = new JsonReader[Float] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): Float = { - if(it.currentToken().isNumberValue) { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): Float = { + if (it.currentToken().isNumberValue) { val res = it.float() it.next() res } else { - ReaderError.wrongJson(s"Expected float value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected float value but found: ${it.currentToken()}" + ) } } } implicit lazy val doubleReader: JsonReader[Double] = new JsonReader[Double] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): Double = { - if(it.currentToken().isNumberValue) { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): Double = { + if (it.currentToken().isNumberValue) { val res = it.double() it.next() res } else { - ReaderError.wrongJson(s"Expected double value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected double value but found: ${it.currentToken()}" + ) } } } - implicit lazy val bigDecimalReader: JsonReader[BigDecimal] = numberReader.map { - case bd: BigDecimal => bd - case bi: BigInt => BigDecimal(bi) - case jbd: java.math.BigDecimal => BigDecimal(jbd) - case jint: java.lang.Integer => BigDecimal(jint) - case jshort: java.lang.Short => BigDecimal(jshort.longValue()) - case jlong: java.lang.Long => BigDecimal(jlong) - case jbi: java.math.BigInteger => BigDecimal(jbi) - case jfloat: java.lang.Float => BigDecimal(jfloat.toDouble) - case jdouble: java.lang.Double => BigDecimal(jdouble) - case num => BigDecimal(num.doubleValue()) - } + implicit lazy val bigDecimalReader: JsonReader[BigDecimal] = + numberReader.map { + case bd: BigDecimal => bd + case bi: BigInt => BigDecimal(bi) + case jbd: java.math.BigDecimal => BigDecimal(jbd) + case jint: java.lang.Integer => BigDecimal(jint) + case jshort: java.lang.Short => BigDecimal(jshort.longValue()) + case jlong: java.lang.Long => BigDecimal(jlong) + case jbi: java.math.BigInteger => BigDecimal(jbi) + case jfloat: java.lang.Float => BigDecimal(jfloat.toDouble) + case jdouble: java.lang.Double => BigDecimal(jdouble) + case num => BigDecimal(num.doubleValue()) + } implicit lazy val bigIntReader: JsonReader[BigInt] = numberReader.map { - case bi: BigInt => bi + case bi: BigInt => bi case jbi: java.math.BigInteger => BigInt(jbi) - case bd: BigDecimal => bd.toBigInt + case bd: BigDecimal => bd.toBigInt case jbd: java.math.BigDecimal => jbd.toBigInteger - case jint: java.lang.Integer => BigInt(jint) - case jshort: java.lang.Short => BigInt(jshort.longValue()) - case jlong: java.lang.Long => BigInt(jlong) - case num => BigInt(num.longValue()) + case jint: java.lang.Integer => BigInt(jint) + case jshort: java.lang.Short => BigInt(jshort.longValue()) + case jlong: java.lang.Long => BigInt(jlong) + case num => BigInt(num.longValue()) } - - implicit lazy val javaBooleanReader: JsonReader[java.lang.Boolean] = booleanReader.map(a => a) - implicit lazy val javaShortReader: JsonReader[java.lang.Short] = shortReader.map(a => a) - implicit lazy val javaIntReader: JsonReader[java.lang.Integer] = intReader.map(a => a) - implicit lazy val javaLongReader: JsonReader[java.lang.Long] = longReader.map(a => a) - implicit lazy val javaFloatReader: JsonReader[java.lang.Float] = floatReader.map(a => a) - implicit lazy val javaDoubleReader: JsonReader[java.lang.Double] = doubleReader.map(a => a) - implicit lazy val javaBigDecimalReader: JsonReader[java.math.BigDecimal] = bigDecimalReader.map(_.bigDecimal) - implicit lazy val javaBigIntegerReader: JsonReader[java.math.BigInteger] = bigIntReader.map(_.bigInteger) - implicit lazy val javaUUIDReader: JsonReader[java.util.UUID] = stringReader.map(java.util.UUID.fromString(_)) + implicit lazy val javaBooleanReader: JsonReader[java.lang.Boolean] = + booleanReader.map(a => a) + implicit lazy val javaShortReader: JsonReader[java.lang.Short] = + shortReader.map(a => a) + implicit lazy val javaIntReader: JsonReader[java.lang.Integer] = + intReader.map(a => a) + implicit lazy val javaLongReader: JsonReader[java.lang.Long] = + longReader.map(a => a) + implicit lazy val javaFloatReader: JsonReader[java.lang.Float] = + floatReader.map(a => a) + implicit lazy val javaDoubleReader: JsonReader[java.lang.Double] = + doubleReader.map(a => a) + implicit lazy val javaBigDecimalReader: JsonReader[java.math.BigDecimal] = + bigDecimalReader.map(_.bigDecimal) + implicit lazy val javaBigIntegerReader: JsonReader[java.math.BigInteger] = + bigIntReader.map(_.bigInteger) + implicit lazy val javaUUIDReader: JsonReader[java.util.UUID] = + stringReader.map(java.util.UUID.fromString(_)) } diff --git a/modules/core/src/main/scala/tethys/readers/instances/IterableReaders.scala b/modules/core/src/main/scala/tethys/readers/instances/IterableReaders.scala index e237819c..4d2f1588 100644 --- a/modules/core/src/main/scala/tethys/readers/instances/IterableReaders.scala +++ b/modules/core/src/main/scala/tethys/readers/instances/IterableReaders.scala @@ -12,72 +12,114 @@ import scala.language.higherKinds private[tethys] trait IterableReaders extends LowPriorityIterableReaders { implicit def shortIterableReader[C[X] <: Iterable[X]](implicit - cb: CollectionBuilder[Short, C[Short]]): JsonReader[C[Short]] = new TraversableReader[Short, C] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[Short, C[Short]])(implicit fieldName: FieldName): Unit = { + cb: CollectionBuilder[Short, C[Short]] + ): JsonReader[C[Short]] = new TraversableReader[Short, C] { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[Short, C[Short]] + )(implicit fieldName: FieldName): Unit = { builder += PrimitiveReaders.ShortJsonReader.read(it) } } implicit def intIterableReader[C[X] <: Iterable[X]](implicit - cb: CollectionBuilder[Int, C[Int]]): JsonReader[C[Int]] = new TraversableReader[Int, C] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[Int, C[Int]])(implicit fieldName: FieldName): Unit = { + cb: CollectionBuilder[Int, C[Int]] + ): JsonReader[C[Int]] = new TraversableReader[Int, C] { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[Int, C[Int]] + )(implicit fieldName: FieldName): Unit = { builder += PrimitiveReaders.IntJsonReader.read(it) } } implicit def longIterableReader[C[X] <: Iterable[X]](implicit - cb: CollectionBuilder[Long, C[Long]]): JsonReader[C[Long]] = new TraversableReader[Long, C] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[Long, C[Long]])(implicit fieldName: FieldName): Unit = { + cb: CollectionBuilder[Long, C[Long]] + ): JsonReader[C[Long]] = new TraversableReader[Long, C] { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[Long, C[Long]] + )(implicit fieldName: FieldName): Unit = { builder += PrimitiveReaders.LongJsonReader.read(it) } } implicit def floatIterableReader[C[X] <: Iterable[X]](implicit - cb: CollectionBuilder[Float, C[Float]]): JsonReader[C[Float]] = new TraversableReader[Float, C] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[Float, C[Float]])(implicit fieldName: FieldName): Unit = { + cb: CollectionBuilder[Float, C[Float]] + ): JsonReader[C[Float]] = new TraversableReader[Float, C] { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[Float, C[Float]] + )(implicit fieldName: FieldName): Unit = { builder += PrimitiveReaders.FloatJsonReader.read(it) } } implicit def doubleIterableReader[C[X] <: Iterable[X]](implicit - cb: CollectionBuilder[Double, C[Double]]): JsonReader[C[Double]] = new TraversableReader[Double, C] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[Double, C[Double]])(implicit fieldName: FieldName): Unit = { + cb: CollectionBuilder[Double, C[Double]] + ): JsonReader[C[Double]] = new TraversableReader[Double, C] { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[Double, C[Double]] + )(implicit fieldName: FieldName): Unit = { builder += PrimitiveReaders.DoubleJsonReader.read(it) } } implicit def booleanIterableReader[C[X] <: Iterable[X]](implicit - cb: CollectionBuilder[Boolean, C[Boolean]]): JsonReader[C[Boolean]] = new TraversableReader[Boolean, C] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[Boolean, C[Boolean]])(implicit fieldName: FieldName): Unit = { + cb: CollectionBuilder[Boolean, C[Boolean]] + ): JsonReader[C[Boolean]] = new TraversableReader[Boolean, C] { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[Boolean, C[Boolean]] + )(implicit fieldName: FieldName): Unit = { builder += PrimitiveReaders.BooleanJsonReader.read(it) } } } -private[tethys] trait LowPriorityIterableReaders extends LowPriorityJsonReaders { +private[tethys] trait LowPriorityIterableReaders + extends LowPriorityJsonReaders { implicit def iterableReader[A, C[X] <: Iterable[X]](implicit - jsonReader: JsonReader[A], - collectionBuilder: CollectionBuilder[A, C[A]]): JsonReader[C[A]] = new TraversableReader[A, C] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[A, C[A]])(implicit fieldName: FieldName): Unit = { + jsonReader: JsonReader[A], + collectionBuilder: CollectionBuilder[A, C[A]] + ): JsonReader[C[A]] = new TraversableReader[A, C] { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[A, C[A]] + )(implicit fieldName: FieldName): Unit = { builder += jsonReader.read(it) } } protected abstract class TraversableReader[A, C[X] <: Iterable[X]](implicit - cb: CollectionBuilder[A, C[A]]) extends JsonReader[C[A]] { - protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[A, C[A]])(implicit fieldName: FieldName): Unit + cb: CollectionBuilder[A, C[A]] + ) extends JsonReader[C[A]] { + protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[A, C[A]] + )(implicit fieldName: FieldName): Unit - override def read(it: TokenIterator)(implicit fieldName: FieldName): C[A] = { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): C[A] = { if (it.currentToken().isArrayStart) recRead(0, it.next(), cb.newBuilder) - else ReaderError.wrongJson(s"Expected array start but found: ${it.currentToken()}") + else + ReaderError.wrongJson( + s"Expected array start but found: ${it.currentToken()}" + ) } @tailrec - private def recRead(i: Int, it: TokenIterator, builder: mutable.Builder[A, C[A]]) - (implicit fieldName: FieldName): C[A] = { + private def recRead( + i: Int, + it: TokenIterator, + builder: mutable.Builder[A, C[A]] + )(implicit fieldName: FieldName): C[A] = { it.currentToken() match { - case token if token.isEmpty => ReaderError.wrongJson("Unexpected end of input") + case token if token.isEmpty => + ReaderError.wrongJson("Unexpected end of input") case token if token.isArrayEnd => it.nextToken() builder.result() diff --git a/modules/core/src/main/scala/tethys/readers/instances/LowPriorityJsonReaders.scala b/modules/core/src/main/scala/tethys/readers/instances/LowPriorityJsonReaders.scala index 77aef95f..4753bd8c 100644 --- a/modules/core/src/main/scala/tethys/readers/instances/LowPriorityJsonReaders.scala +++ b/modules/core/src/main/scala/tethys/readers/instances/LowPriorityJsonReaders.scala @@ -4,7 +4,9 @@ import tethys.JsonReader import tethys.commons.LowPriorityInstance private[tethys] trait LowPriorityJsonReaders { - implicit final def lowPriorityReader[A](implicit lowPriorityInstance: LowPriorityInstance[JsonReader[A]]): JsonReader[A] = { + implicit final def lowPriorityReader[A](implicit + lowPriorityInstance: LowPriorityInstance[JsonReader[A]] + ): JsonReader[A] = { lowPriorityInstance.instance } -} \ No newline at end of file +} diff --git a/modules/core/src/main/scala/tethys/readers/instances/MapReaders.scala b/modules/core/src/main/scala/tethys/readers/instances/MapReaders.scala index 6cd964c0..cdbc4b05 100644 --- a/modules/core/src/main/scala/tethys/readers/instances/MapReaders.scala +++ b/modules/core/src/main/scala/tethys/readers/instances/MapReaders.scala @@ -11,66 +11,92 @@ import scala.language.higherKinds private[tethys] trait MapReaders extends LowPriorityMapReaders { implicit def shortMapReader[K, M[X, Y] <: scala.collection.Map[X, Y]](implicit - keyReader: KeyReader[K], - cb: CollectionBuilder[(K, Short), M[K, Short]] - ): JsonReader[M[K, Short]] = { + keyReader: KeyReader[K], + cb: CollectionBuilder[(K, Short), M[K, Short]] + ): JsonReader[M[K, Short]] = { new MapReader[K, Short, M] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[(K, Short), M[K, Short]], key: K)(implicit fieldName: FieldName): Unit = { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[(K, Short), M[K, Short]], + key: K + )(implicit fieldName: FieldName): Unit = { builder += key -> PrimitiveReaders.ShortJsonReader.read(it) } } } implicit def intMapReader[K, M[X, Y] <: scala.collection.Map[X, Y]](implicit - keyReader: KeyReader[K], - cb: CollectionBuilder[(K, Int), M[K, Int]] - ): JsonReader[M[K, Int]] = { + keyReader: KeyReader[K], + cb: CollectionBuilder[(K, Int), M[K, Int]] + ): JsonReader[M[K, Int]] = { new MapReader[K, Int, M] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[(K, Int), M[K, Int]], key: K)(implicit fieldName: FieldName): Unit = { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[(K, Int), M[K, Int]], + key: K + )(implicit fieldName: FieldName): Unit = { builder += key -> PrimitiveReaders.IntJsonReader.read(it) } } } implicit def longMapReader[K, M[X, Y] <: scala.collection.Map[X, Y]](implicit - keyReader: KeyReader[K], - cb: CollectionBuilder[(K, Long), M[K, Long]] - ): JsonReader[M[K, Long]] = { + keyReader: KeyReader[K], + cb: CollectionBuilder[(K, Long), M[K, Long]] + ): JsonReader[M[K, Long]] = { new MapReader[K, Long, M] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[(K, Long), M[K, Long]], key: K)(implicit fieldName: FieldName): Unit = { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[(K, Long), M[K, Long]], + key: K + )(implicit fieldName: FieldName): Unit = { builder += key -> PrimitiveReaders.LongJsonReader.read(it) } } } implicit def floatMapReader[K, M[X, Y] <: scala.collection.Map[X, Y]](implicit - keyReader: KeyReader[K], - cb: CollectionBuilder[(K, Float), M[K, Float]] - ): JsonReader[M[K, Float]] = { + keyReader: KeyReader[K], + cb: CollectionBuilder[(K, Float), M[K, Float]] + ): JsonReader[M[K, Float]] = { new MapReader[K, Float, M] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[(K, Float), M[K, Float]], key: K)(implicit fieldName: FieldName): Unit = { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[(K, Float), M[K, Float]], + key: K + )(implicit fieldName: FieldName): Unit = { builder += key -> PrimitiveReaders.FloatJsonReader.read(it) } } } - implicit def doubleMapReader[K, M[X, Y] <: scala.collection.Map[X, Y]](implicit - keyReader: KeyReader[K], - cb: CollectionBuilder[(K, Double), M[K, Double]] - ): JsonReader[M[K, Double]] = { + implicit def doubleMapReader[K, M[X, Y] <: scala.collection.Map[X, Y]]( + implicit + keyReader: KeyReader[K], + cb: CollectionBuilder[(K, Double), M[K, Double]] + ): JsonReader[M[K, Double]] = { new MapReader[K, Double, M] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[(K, Double), M[K, Double]], key: K)(implicit fieldName: FieldName): Unit = { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[(K, Double), M[K, Double]], + key: K + )(implicit fieldName: FieldName): Unit = { builder += key -> PrimitiveReaders.DoubleJsonReader.read(it) } } } - implicit def booleanMapReader[K, M[X, Y] <: scala.collection.Map[X, Y]](implicit - keyReader: KeyReader[K], - cb: CollectionBuilder[(K, Boolean), M[K, Boolean]] - ): JsonReader[M[K, Boolean]] = { + implicit def booleanMapReader[K, M[X, Y] <: scala.collection.Map[X, Y]]( + implicit + keyReader: KeyReader[K], + cb: CollectionBuilder[(K, Boolean), M[K, Boolean]] + ): JsonReader[M[K, Boolean]] = { new MapReader[K, Boolean, M] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[(K, Boolean), M[K, Boolean]], key: K)(implicit fieldName: FieldName): Unit = { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[(K, Boolean), M[K, Boolean]], + key: K + )(implicit fieldName: FieldName): Unit = { builder += key -> PrimitiveReaders.BooleanJsonReader.read(it) } } @@ -80,34 +106,48 @@ private[tethys] trait MapReaders extends LowPriorityMapReaders { private[tethys] trait LowPriorityMapReaders extends IterableReaders { implicit def mapReader[K, A, M[X, Y] <: scala.collection.Map[X, Y]](implicit - keyReader: KeyReader[K], - jsonReader: JsonReader[A], - cb: CollectionBuilder[(K, A), M[K, A]] - ): JsonReader[M[K, A]] = { + keyReader: KeyReader[K], + jsonReader: JsonReader[A], + cb: CollectionBuilder[(K, A), M[K, A]] + ): JsonReader[M[K, A]] = { new MapReader[K, A, M] { - override protected def appendBuilder(it: TokenIterator, builder: mutable.Builder[(K, A), M[K, A]], key: K)(implicit fieldName: FieldName): Unit = { + override protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[(K, A), M[K, A]], + key: K + )(implicit fieldName: FieldName): Unit = { builder += key -> jsonReader.read(it) } } } protected abstract class MapReader[K, A, M[_, _]](implicit - keyReader: KeyReader[K], - cb: CollectionBuilder[(K, A), M[K, A]] - ) extends JsonReader[M[K, A]] { - - protected def appendBuilder(it: TokenIterator, - builder: mutable.Builder[(K, A), M[K, A]], - key: K)(implicit fieldName: FieldName): Unit - - override def read(it: TokenIterator)(implicit fieldName: FieldName): M[K, A] = { - if (it.currentToken().isObjectStart) recRead(it.next(), cb.newBuilder)(fieldName) - else ReaderError.wrongJson(s"Expected object start but found: ${it.currentToken()}") + keyReader: KeyReader[K], + cb: CollectionBuilder[(K, A), M[K, A]] + ) extends JsonReader[M[K, A]] { + + protected def appendBuilder( + it: TokenIterator, + builder: mutable.Builder[(K, A), M[K, A]], + key: K + )(implicit fieldName: FieldName): Unit + + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): M[K, A] = { + if (it.currentToken().isObjectStart) + recRead(it.next(), cb.newBuilder)(fieldName) + else + ReaderError.wrongJson( + s"Expected object start but found: ${it.currentToken()}" + ) } @tailrec - private def recRead(it: TokenIterator, builder: mutable.Builder[(K, A), M[K, A]]) - (fieldName: FieldName): M[K, A] = { + private def recRead( + it: TokenIterator, + builder: mutable.Builder[(K, A), M[K, A]] + )(fieldName: FieldName): M[K, A] = { it.currentToken() match { case token if token.isObjectEnd => it.nextToken() @@ -115,10 +155,17 @@ private[tethys] trait LowPriorityMapReaders extends IterableReaders { case token if token.isFieldName => val name = it.fieldName() val nextFieldName = fieldName.appendFieldName(name) - appendBuilder(it.next(), builder, keyReader.read(name)(nextFieldName))(nextFieldName) + appendBuilder( + it.next(), + builder, + keyReader.read(name)(nextFieldName) + )(nextFieldName) recRead(it, builder)(fieldName) - case token => ReaderError.wrongJson(s"Expect end of object or field name but '$token' found")(fieldName) + case token => + ReaderError.wrongJson( + s"Expect end of object or field name but '$token' found" + )(fieldName) } } } diff --git a/modules/core/src/main/scala/tethys/readers/instances/OptionReaders.scala b/modules/core/src/main/scala/tethys/readers/instances/OptionReaders.scala index c36607b5..03d7bf3a 100644 --- a/modules/core/src/main/scala/tethys/readers/instances/OptionReaders.scala +++ b/modules/core/src/main/scala/tethys/readers/instances/OptionReaders.scala @@ -5,46 +5,68 @@ import tethys.readers.FieldName import tethys.readers.tokens.TokenIterator private[tethys] trait OptionReaders extends LowPriorityOptionReaders { - implicit lazy val shortOptionReader: JsonReader[Option[Short]] = new OptionJsonReader[Short] { - override protected def readSomeValue(it: TokenIterator)(implicit fieldName: FieldName): Option[Short] = { - Some(PrimitiveReaders.ShortJsonReader.read(it)) + implicit lazy val shortOptionReader: JsonReader[Option[Short]] = + new OptionJsonReader[Short] { + override protected def readSomeValue( + it: TokenIterator + )(implicit fieldName: FieldName): Option[Short] = { + Some(PrimitiveReaders.ShortJsonReader.read(it)) + } } - } - implicit lazy val intOptionReader: JsonReader[Option[Int]] = new OptionJsonReader[Int] { - override protected def readSomeValue(it: TokenIterator)(implicit fieldName: FieldName): Option[Int] = { - Some(PrimitiveReaders.IntJsonReader.read(it)) + implicit lazy val intOptionReader: JsonReader[Option[Int]] = + new OptionJsonReader[Int] { + override protected def readSomeValue( + it: TokenIterator + )(implicit fieldName: FieldName): Option[Int] = { + Some(PrimitiveReaders.IntJsonReader.read(it)) + } } - } - implicit lazy val longOptionReader: JsonReader[Option[Long]] = new OptionJsonReader[Long] { - override protected def readSomeValue(it: TokenIterator)(implicit fieldName: FieldName): Option[Long] = { - Some(PrimitiveReaders.LongJsonReader.read(it)) + implicit lazy val longOptionReader: JsonReader[Option[Long]] = + new OptionJsonReader[Long] { + override protected def readSomeValue( + it: TokenIterator + )(implicit fieldName: FieldName): Option[Long] = { + Some(PrimitiveReaders.LongJsonReader.read(it)) + } } - } - implicit lazy val floatOptionReader: JsonReader[Option[Float]] = new OptionJsonReader[Float] { - override protected def readSomeValue(it: TokenIterator)(implicit fieldName: FieldName): Option[Float] = { - Some(PrimitiveReaders.FloatJsonReader.read(it)) + implicit lazy val floatOptionReader: JsonReader[Option[Float]] = + new OptionJsonReader[Float] { + override protected def readSomeValue( + it: TokenIterator + )(implicit fieldName: FieldName): Option[Float] = { + Some(PrimitiveReaders.FloatJsonReader.read(it)) + } } - } - implicit lazy val doubleOptionReader: JsonReader[Option[Double]] = new OptionJsonReader[Double] { - override protected def readSomeValue(it: TokenIterator)(implicit fieldName: FieldName): Option[Double] = { - Some(PrimitiveReaders.DoubleJsonReader.read(it)) + implicit lazy val doubleOptionReader: JsonReader[Option[Double]] = + new OptionJsonReader[Double] { + override protected def readSomeValue( + it: TokenIterator + )(implicit fieldName: FieldName): Option[Double] = { + Some(PrimitiveReaders.DoubleJsonReader.read(it)) + } } - } - implicit lazy val booleanOptionReader: JsonReader[Option[Boolean]] = new OptionJsonReader[Boolean] { - override protected def readSomeValue(it: TokenIterator)(implicit fieldName: FieldName): Option[Boolean] = { - Some(PrimitiveReaders.BooleanJsonReader.read(it)) + implicit lazy val booleanOptionReader: JsonReader[Option[Boolean]] = + new OptionJsonReader[Boolean] { + override protected def readSomeValue( + it: TokenIterator + )(implicit fieldName: FieldName): Option[Boolean] = { + Some(PrimitiveReaders.BooleanJsonReader.read(it)) + } } - } } private[tethys] trait LowPriorityOptionReaders extends MapReaders { - implicit def optionReader[A](implicit jsonReader: JsonReader[A]): JsonReader[Option[A]] = new OptionJsonReader[A] { - override protected def readSomeValue(it: TokenIterator)(implicit fieldName: FieldName): Option[A] = { + implicit def optionReader[A](implicit + jsonReader: JsonReader[A] + ): JsonReader[Option[A]] = new OptionJsonReader[A] { + override protected def readSomeValue( + it: TokenIterator + )(implicit fieldName: FieldName): Option[A] = { Some(jsonReader.read(it)) } } @@ -52,9 +74,13 @@ private[tethys] trait LowPriorityOptionReaders extends MapReaders { @specialized protected abstract class OptionJsonReader[A] extends JsonReader[Option[A]] { - protected def readSomeValue(it: TokenIterator)(implicit fieldName: FieldName): Option[A] + protected def readSomeValue(it: TokenIterator)(implicit + fieldName: FieldName + ): Option[A] - override def read(it: TokenIterator)(implicit fieldName: FieldName): Option[A] = { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): Option[A] = { if (it.currentToken().isNullValue) { it.nextToken() None diff --git a/modules/core/src/main/scala/tethys/readers/instances/PrimitiveReaders.scala b/modules/core/src/main/scala/tethys/readers/instances/PrimitiveReaders.scala index c5477afc..fbb40c8e 100644 --- a/modules/core/src/main/scala/tethys/readers/instances/PrimitiveReaders.scala +++ b/modules/core/src/main/scala/tethys/readers/instances/PrimitiveReaders.scala @@ -6,19 +6,21 @@ import tethys.readers.{FieldName, ReaderError} object PrimitiveReaders { object ShortJsonReader { def read(it: TokenIterator)(implicit fieldName: FieldName): Short = { - if(it.currentToken().isNumberValue) { + if (it.currentToken().isNumberValue) { val res = it.short() it.nextToken() res } else { - ReaderError.wrongJson(s"Expected short value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected short value but found: ${it.currentToken()}" + ) } } } object IntJsonReader { def read(it: TokenIterator)(implicit fieldName: FieldName): Int = { - if(it.currentToken().isNumberValue) { + if (it.currentToken().isNumberValue) { val res = it.int() it.nextToken() res @@ -28,54 +30,64 @@ object PrimitiveReaders { } private def error(it: TokenIterator)(implicit fieldName: FieldName) = { - ReaderError.wrongJson(s"Expected int value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected int value but found: ${it.currentToken()}" + ) } } object LongJsonReader { def read(it: TokenIterator)(implicit fieldName: FieldName): Long = { - if(it.currentToken().isNumberValue) { + if (it.currentToken().isNumberValue) { val res = it.long() it.nextToken() res } else { - ReaderError.wrongJson(s"Expected long value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected long value but found: ${it.currentToken()}" + ) } } } object FloatJsonReader { def read(it: TokenIterator)(implicit fieldName: FieldName): Float = { - if(it.currentToken().isNumberValue) { + if (it.currentToken().isNumberValue) { val res = it.float() it.nextToken() res } else { - ReaderError.wrongJson(s"Expected float value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected float value but found: ${it.currentToken()}" + ) } } } object DoubleJsonReader { def read(it: TokenIterator)(implicit fieldName: FieldName): Double = { - if(it.currentToken().isNumberValue) { + if (it.currentToken().isNumberValue) { val res = it.double() it.nextToken() res } else { - ReaderError.wrongJson(s"Expected double value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected double value but found: ${it.currentToken()}" + ) } } } object BooleanJsonReader { def read(it: TokenIterator)(implicit fieldName: FieldName): Boolean = { - if(it.currentToken().isBooleanValue) { + if (it.currentToken().isBooleanValue) { val res = it.boolean() it.nextToken() res } else { - ReaderError.wrongJson(s"Expected boolean value but found: ${it.currentToken()}") + ReaderError.wrongJson( + s"Expected boolean value but found: ${it.currentToken()}" + ) } } } diff --git a/modules/core/src/main/scala/tethys/readers/instances/SelectingJsonReader.scala b/modules/core/src/main/scala/tethys/readers/instances/SelectingJsonReader.scala index 6d870748..92cce2d9 100644 --- a/modules/core/src/main/scala/tethys/readers/instances/SelectingJsonReader.scala +++ b/modules/core/src/main/scala/tethys/readers/instances/SelectingJsonReader.scala @@ -4,7 +4,9 @@ import tethys.JsonReader import tethys.readers.FieldName import tethys.readers.tokens.TokenIterator -class SelectingJsonReader[A, B](simpleJsonReader: SimpleJsonReader[A])(selector: A => JsonReader[_ <: B]) extends JsonReader[B] { +class SelectingJsonReader[A, B](simpleJsonReader: SimpleJsonReader[A])( + selector: A => JsonReader[_ <: B] +) extends JsonReader[B] { override def read(it: TokenIterator)(implicit fieldName: FieldName): B = { val it1 = it.collectExpression() diff --git a/modules/core/src/main/scala/tethys/readers/instances/SimpleJsonReader.scala b/modules/core/src/main/scala/tethys/readers/instances/SimpleJsonReader.scala index f64bc997..bcb6e396 100644 --- a/modules/core/src/main/scala/tethys/readers/instances/SimpleJsonReader.scala +++ b/modules/core/src/main/scala/tethys/readers/instances/SimpleJsonReader.scala @@ -8,37 +8,69 @@ import tethys.readers.{FieldName, ReaderError} import scala.annotation.tailrec import scala.collection.mutable -private[readers] class SimpleJsonReader[A](fields: Array[FieldDefinition[_]], mapper: Array[Any] => A, strict: Boolean) extends JsonReader[A] { +private[readers] class SimpleJsonReader[A]( + fields: Array[FieldDefinition[_]], + mapper: Array[Any] => A, + strict: Boolean +) extends JsonReader[A] { private val defaults: Array[Any] = fields.map(_.defaultValue) override def read(it: TokenIterator)(implicit fieldName: FieldName): A = { - if(!it.currentToken().isObjectStart) ReaderError.wrongJson(s"Expected object start but found: ${it.currentToken()}") + if (!it.currentToken().isObjectStart) + ReaderError.wrongJson( + s"Expected object start but found: ${it.currentToken()}" + ) else { it.nextToken() val extracted: Array[Any] = recRead(it, defaults.clone()) - val notExtracted = collectNotExtracted(0, hasErrors = false, extracted, new mutable.StringBuilder()) - if(notExtracted.nonEmpty) ReaderError.wrongJson(s"Can not extract fields $notExtracted") + val notExtracted = collectNotExtracted( + 0, + hasErrors = false, + extracted, + new mutable.StringBuilder() + ) + if (notExtracted.nonEmpty) + ReaderError.wrongJson(s"Can not extract fields $notExtracted") else mapper(extracted) } } @tailrec - private def collectNotExtracted(i: Int, hasErrors: Boolean, extracted: Array[Any], builder: mutable.StringBuilder): String = { - if(i >= extracted.length) { - if(hasErrors) builder.append('\'').result() + private def collectNotExtracted( + i: Int, + hasErrors: Boolean, + extracted: Array[Any], + builder: mutable.StringBuilder + ): String = { + if (i >= extracted.length) { + if (hasErrors) builder.append('\'').result() else "" - } else if(extracted(i) == null) { - if(!hasErrors) collectNotExtracted(i + 1, hasErrors = true, extracted, builder.append('\'').append(fields(i).name)) - else collectNotExtracted(i + 1, hasErrors = true, extracted, builder.append("', '").append(fields(i).name)) + } else if (extracted(i) == null) { + if (!hasErrors) + collectNotExtracted( + i + 1, + hasErrors = true, + extracted, + builder.append('\'').append(fields(i).name) + ) + else + collectNotExtracted( + i + 1, + hasErrors = true, + extracted, + builder.append("', '").append(fields(i).name) + ) } else { collectNotExtracted(i + 1, hasErrors, extracted, builder) } } @tailrec - private def recRead(it: TokenIterator, extracted: Array[Any])(implicit fieldName: FieldName): Array[Any] = { + private def recRead(it: TokenIterator, extracted: Array[Any])(implicit + fieldName: FieldName + ): Array[Any] = { it.currentToken() match { case token if token.isObjectEnd => it.nextToken() @@ -47,27 +79,31 @@ private[readers] class SimpleJsonReader[A](fields: Array[FieldDefinition[_]], ma val name = it.fieldName() recRead(it, extractField(0, name, it.next(), extracted)) case token => - ReaderError.wrongJson(s"Expect end of object or field name but '$token' found") + ReaderError.wrongJson( + s"Expect end of object or field name but '$token' found" + ) } } @tailrec - private def extractField(i: Int, - name: String, - it: TokenIterator, - extracted: Array[Any]) - (implicit - fieldName: FieldName): Array[Any] = { - if(i >= extracted.length) { - if(strict) { - ReaderError.wrongJson(s"unexpected field '$name', expected one of ${fields.map(_.name).mkString("'", "', '", "'")}") + private def extractField( + i: Int, + name: String, + it: TokenIterator, + extracted: Array[Any] + )(implicit fieldName: FieldName): Array[Any] = { + if (i >= extracted.length) { + if (strict) { + ReaderError.wrongJson( + s"unexpected field '$name', expected one of ${fields.map(_.name).mkString("'", "', '", "'")}" + ) } else { it.skipExpression() extracted } } else { val field = fields(i) - if(field.name == name) { + if (field.name == name) { extracted(i) = field.reader.read(it)(fieldName.appendFieldName(name)) extracted } else { @@ -78,5 +114,9 @@ private[readers] class SimpleJsonReader[A](fields: Array[FieldDefinition[_]], ma } private[readers] object SimpleJsonReader { - case class FieldDefinition[A](name: String, defaultValue: Any, reader: JsonReader[A]) -} \ No newline at end of file + case class FieldDefinition[A]( + name: String, + defaultValue: Any, + reader: JsonReader[A] + ) +} diff --git a/modules/core/src/main/scala/tethys/readers/tokens/BaseTokenIterator.scala b/modules/core/src/main/scala/tethys/readers/tokens/BaseTokenIterator.scala index c4731d9a..482958db 100644 --- a/modules/core/src/main/scala/tethys/readers/tokens/BaseTokenIterator.scala +++ b/modules/core/src/main/scala/tethys/readers/tokens/BaseTokenIterator.scala @@ -16,35 +16,39 @@ trait BaseTokenIterator extends TokenIterator { override def skipExpression(): this.type = { val token = currentToken() - if(token.isStructStart) skipStructure(1).next() + if (token.isStructStart) skipStructure(1).next() else next() } override def collectExpression(): TokenIterator with CopySupport = { val queue = createTokenNode() match { case (node, 0) => immutable.Queue[TokenNode](node) - case (node, _) => collectTokens(1, immutable.Queue.newBuilder[TokenNode] += node) + case (node, _) => + collectTokens(1, immutable.Queue.newBuilder[TokenNode] += node) } - nextToken()//set pointer after this expression end + nextToken() // set pointer after this expression end new QueueIterator(queue) } @tailrec private def skipStructure(started: Int): this.type = { - if(started == 0) this + if (started == 0) this else { val token = nextToken() - if(token.isStructStart) skipStructure(started + 1) - else if(token.isStructEnd) skipStructure(started - 1) + if (token.isStructStart) skipStructure(started + 1) + else if (token.isStructEnd) skipStructure(started - 1) else skipStructure(started) } } @tailrec - private def collectTokens(started: Int, builder: mutable.Builder[TokenNode, immutable.Queue[TokenNode]]): immutable.Queue[TokenNode] = { - if(started == 0) builder.result() + private def collectTokens( + started: Int, + builder: mutable.Builder[TokenNode, immutable.Queue[TokenNode]] + ): immutable.Queue[TokenNode] = { + if (started == 0) builder.result() else { nextToken() val (node, shift) = createTokenNode() @@ -54,20 +58,20 @@ trait BaseTokenIterator extends TokenIterator { private def createTokenNode(): (TokenNode, Int) = { val token = currentToken() - if(token.isArrayStart) ArrayStartNode -> 1 - else if(token.isArrayEnd) ArrayEndNode -> -1 - else if(token.isObjectStart) ObjectStartNode -> 1 - else if(token.isObjectEnd) ObjectEndNode -> -1 - else if(token.isNullValue) NullValueNode -> 0 - else if(token.isFieldName) FieldNameNode(fieldName()) -> 0 - else if(token.isStringValue) StringValueNode(string()) -> 0 - else if(token.isNumberValue) number() match { - case v: java.lang.Short => ShortValueNode(v) -> 0 + if (token.isArrayStart) ArrayStartNode -> 1 + else if (token.isArrayEnd) ArrayEndNode -> -1 + else if (token.isObjectStart) ObjectStartNode -> 1 + else if (token.isObjectEnd) ObjectEndNode -> -1 + else if (token.isNullValue) NullValueNode -> 0 + else if (token.isFieldName) FieldNameNode(fieldName()) -> 0 + else if (token.isStringValue) StringValueNode(string()) -> 0 + else if (token.isNumberValue) number() match { + case v: java.lang.Short => ShortValueNode(v) -> 0 case v: java.lang.Integer => IntValueNode(v) -> 0 - case v: java.lang.Long => LongValueNode(v) -> 0 - case v: java.lang.Float => FloatValueNode(v) -> 0 - case v: java.lang.Double => DoubleValueNode(v) -> 0 - case n => NumberValueNode(n) -> 0 + case v: java.lang.Long => LongValueNode(v) -> 0 + case v: java.lang.Float => FloatValueNode(v) -> 0 + case v: java.lang.Double => DoubleValueNode(v) -> 0 + case n => NumberValueNode(n) -> 0 } else BooleanValueNode(boolean()) -> 0 } diff --git a/modules/core/src/main/scala/tethys/readers/tokens/QueueIterator.scala b/modules/core/src/main/scala/tethys/readers/tokens/QueueIterator.scala index 72157ad0..de4f4ac1 100644 --- a/modules/core/src/main/scala/tethys/readers/tokens/QueueIterator.scala +++ b/modules/core/src/main/scala/tethys/readers/tokens/QueueIterator.scala @@ -10,90 +10,94 @@ import scala.collection.mutable import scala.collection.immutable import scala.reflect.ClassTag -class QueueIterator(private var nodes: immutable.Queue[TokenNode]) extends BaseTokenIterator with CopySupport { +class QueueIterator(private var nodes: immutable.Queue[TokenNode]) + extends BaseTokenIterator + with CopySupport { override def copy(): QueueIterator = QueueIterator(nodes) - override def currentToken(): Token = if(nodes.isEmpty) Token.Empty else nodes.head.token + override def currentToken(): Token = + if (nodes.isEmpty) Token.Empty else nodes.head.token - override def nextToken(): Token = if(nodes.isEmpty) Token.Empty else { + override def nextToken(): Token = if (nodes.isEmpty) Token.Empty + else { nodes = nodes.tail currentToken() } override def fieldName(): String = nodes.front match { case FieldNameNode(name) => name - case node => fail[FieldNameNode](node) + case node => fail[FieldNameNode](node) } override def string(): String = nodes.front match { case StringValueNode(value) => value - case node => fail[StringValueNode](node) + case node => fail[StringValueNode](node) } override def boolean(): Boolean = nodes.front match { case BooleanValueNode(value) => value - case node => fail[BooleanValueNode](node) + case node => fail[BooleanValueNode](node) } override def number(): Number = nodes.front match { case NumberValueNode(value) => value - case ShortValueNode(value) => value - case IntValueNode(value) => value - case LongValueNode(value) => value - case FloatValueNode(value) => value + case ShortValueNode(value) => value + case IntValueNode(value) => value + case LongValueNode(value) => value + case FloatValueNode(value) => value case DoubleValueNode(value) => value - case node => fail[NumberValueNode](node) + case node => fail[NumberValueNode](node) } override def short(): Short = nodes.front match { - case ShortValueNode(value) => value + case ShortValueNode(value) => value case NumberValueNode(value) => value.shortValue() - case IntValueNode(value) => value.toShort - case LongValueNode(value) => value.toShort - case FloatValueNode(value) => value.toShort + case IntValueNode(value) => value.toShort + case LongValueNode(value) => value.toShort + case FloatValueNode(value) => value.toShort case DoubleValueNode(value) => value.toShort - case node => fail[ShortValueNode](node) + case node => fail[ShortValueNode](node) } override def int(): Int = nodes.front match { - case IntValueNode(value) => value + case IntValueNode(value) => value case NumberValueNode(value) => value.intValue() - case ShortValueNode(value) => value.toInt - case LongValueNode(value) => value.toInt - case FloatValueNode(value) => value.toInt + case ShortValueNode(value) => value.toInt + case LongValueNode(value) => value.toInt + case FloatValueNode(value) => value.toInt case DoubleValueNode(value) => value.toInt - case node => fail[IntValueNode](node) + case node => fail[IntValueNode](node) } override def long(): Long = nodes.front match { - case LongValueNode(value) => value + case LongValueNode(value) => value case NumberValueNode(value) => value.longValue() - case ShortValueNode(value) => value.toLong - case IntValueNode(value) => value.toLong - case FloatValueNode(value) => value.toLong + case ShortValueNode(value) => value.toLong + case IntValueNode(value) => value.toLong + case FloatValueNode(value) => value.toLong case DoubleValueNode(value) => value.toLong - case node => fail[LongValueNode](node) + case node => fail[LongValueNode](node) } override def float(): Float = nodes.front match { - case FloatValueNode(value) => value + case FloatValueNode(value) => value case NumberValueNode(value) => value.floatValue() - case ShortValueNode(value) => value.toFloat - case IntValueNode(value) => value.toFloat - case LongValueNode(value) => value.toFloat + case ShortValueNode(value) => value.toFloat + case IntValueNode(value) => value.toFloat + case LongValueNode(value) => value.toFloat case DoubleValueNode(value) => value.toFloat - case node => fail[FloatValueNode](node) + case node => fail[FloatValueNode](node) } override def double(): Double = nodes.front match { case DoubleValueNode(value) => value case NumberValueNode(value) => value.doubleValue() - case ShortValueNode(value) => value.toDouble - case IntValueNode(value) => value.toDouble - case LongValueNode(value) => value.toDouble - case FloatValueNode(value) => value.toDouble - case node => fail[DoubleValueNode](node) + case ShortValueNode(value) => value.toDouble + case IntValueNode(value) => value.toDouble + case LongValueNode(value) => value.toDouble + case FloatValueNode(value) => value.toDouble + case node => fail[DoubleValueNode](node) } override def collectExpression(): TokenIterator with CopySupport = { @@ -107,8 +111,11 @@ class QueueIterator(private var nodes: immutable.Queue[TokenNode]) extends BaseT } @tailrec - private def collectTokens(started: Int, builder: mutable.Builder[TokenNode, immutable.Queue[TokenNode]]): immutable.Queue[TokenNode] = { - if(started == 0) builder.result() + private def collectTokens( + started: Int, + builder: mutable.Builder[TokenNode, immutable.Queue[TokenNode]] + ): immutable.Queue[TokenNode] = { + if (started == 0) builder.result() else { val node = currentNode() collectTokens(started + getTokenShift(node), builder += node) @@ -116,7 +123,8 @@ class QueueIterator(private var nodes: immutable.Queue[TokenNode]) extends BaseT } private def currentNode(): TokenNode = { - if(nodes.isEmpty) throw new NoSuchElementException("Can not finish expression") + if (nodes.isEmpty) + throw new NoSuchElementException("Can not finish expression") else { val (head, tail) = nodes.dequeue nodes = tail @@ -126,17 +134,23 @@ class QueueIterator(private var nodes: immutable.Queue[TokenNode]) extends BaseT private def getTokenShift(node: TokenNode): Int = node match { case ArrayStartNode | ObjectStartNode => 1 - case ArrayEndNode | ObjectEndNode => -1 - case _ => 0 + case ArrayEndNode | ObjectEndNode => -1 + case _ => 0 } - private def fail[A <: TokenNode](actual: TokenNode)(implicit ct: ClassTag[A]): Nothing = { - throw new WrongTokenError(s"Expected '${ct.toString()}' but '$actual' found") + private def fail[A <: TokenNode]( + actual: TokenNode + )(implicit ct: ClassTag[A]): Nothing = { + throw new WrongTokenError( + s"Expected '${ct.toString()}' but '$actual' found" + ) } } -object QueueIterator{ - def apply(nodes: Seq[TokenNode]): QueueIterator = new QueueIterator(immutable.Queue[TokenNode](nodes: _*)) +object QueueIterator { + def apply(nodes: Seq[TokenNode]): QueueIterator = new QueueIterator( + immutable.Queue[TokenNode](nodes: _*) + ) final class WrongTokenError(message: String) extends Exception(message, null) } diff --git a/modules/core/src/main/scala/tethys/writers/EmptyWriters.scala b/modules/core/src/main/scala/tethys/writers/EmptyWriters.scala index f69d93ff..51553c31 100644 --- a/modules/core/src/main/scala/tethys/writers/EmptyWriters.scala +++ b/modules/core/src/main/scala/tethys/writers/EmptyWriters.scala @@ -5,7 +5,8 @@ import tethys.writers.tokens.TokenWriter trait EmptyWriters { def emptyWriter[A]: JsonWriter[A] = new JsonWriter[A] { - override def write(name: String, value: A, tokenWriter: TokenWriter): Unit = () + override def write(name: String, value: A, tokenWriter: TokenWriter): Unit = + () override def write(value: A, tokenWriter: TokenWriter): Unit = () } } diff --git a/modules/core/src/main/scala/tethys/writers/instances/AllJsonWriters.scala b/modules/core/src/main/scala/tethys/writers/instances/AllJsonWriters.scala index d7683dd4..841a678a 100644 --- a/modules/core/src/main/scala/tethys/writers/instances/AllJsonWriters.scala +++ b/modules/core/src/main/scala/tethys/writers/instances/AllJsonWriters.scala @@ -5,78 +5,126 @@ import tethys.writers.tokens.TokenWriter trait AllJsonWriters extends OptionWriters with EitherWriters { implicit lazy val intWriter: JsonWriter[Int] = new JsonWriter[Int] { - override def write(value: Int, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) + override def write(value: Int, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNumber(value) } implicit lazy val longWriter: JsonWriter[Long] = new JsonWriter[Long] { - override def write(value: Long, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) + override def write(value: Long, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNumber(value) } implicit lazy val shortWriter: JsonWriter[Short] = new JsonWriter[Short] { - override def write(value: Short, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) + override def write(value: Short, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNumber(value) } implicit lazy val doubleWriter: JsonWriter[Double] = new JsonWriter[Double] { - override def write(value: Double, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) + override def write(value: Double, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNumber(value) } implicit lazy val floatWriter: JsonWriter[Float] = new JsonWriter[Float] { - override def write(value: Float, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) + override def write(value: Float, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNumber(value) } - implicit lazy val bigDecimalWriter: JsonWriter[BigDecimal] = new JsonWriter[BigDecimal] { - override def write(value: BigDecimal, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) - } + implicit lazy val bigDecimalWriter: JsonWriter[BigDecimal] = + new JsonWriter[BigDecimal] { + override def write(value: BigDecimal, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNumber(value) + } implicit lazy val bigIntWriter: JsonWriter[BigInt] = new JsonWriter[BigInt] { - override def write(value: BigInt, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) + override def write(value: BigInt, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNumber(value) } - implicit lazy val booleanWriter: JsonWriter[Boolean] = new JsonWriter[Boolean] { - override def write(value: Boolean, tokenWriter: TokenWriter): Unit = tokenWriter.writeBoolean(value) - } + implicit lazy val booleanWriter: JsonWriter[Boolean] = + new JsonWriter[Boolean] { + override def write(value: Boolean, tokenWriter: TokenWriter): Unit = + tokenWriter.writeBoolean(value) + } implicit lazy val stringWriter: JsonWriter[String] = new JsonWriter[String] { - override def write(value: String, tokenWriter: TokenWriter): Unit = tokenWriter.writeString(value) - } - - implicit lazy val javaIntWriter: JsonWriter[java.lang.Integer] = new JsonWriter[java.lang.Integer] { - override def write(value: java.lang.Integer, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) - } - - implicit lazy val javaLongWriter: JsonWriter[java.lang.Long] = new JsonWriter[java.lang.Long] { - override def write(value: java.lang.Long, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) - } - - implicit lazy val javaShortWriter: JsonWriter[java.lang.Short] = new JsonWriter[java.lang.Short] { - override def write(value: java.lang.Short, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) - } - - implicit lazy val javaDoubleWriter: JsonWriter[java.lang.Double] = new JsonWriter[java.lang.Double] { - override def write(value: java.lang.Double, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) - } - - implicit lazy val javaFloatWriter: JsonWriter[java.lang.Float] = new JsonWriter[java.lang.Float] { - override def write(value: java.lang.Float, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) - } - - implicit lazy val javaBigDecimalWriter: JsonWriter[java.math.BigDecimal] = new JsonWriter[java.math.BigDecimal] { - override def write(value: java.math.BigDecimal, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) - } - - implicit lazy val javaBigIntegerWriter: JsonWriter[java.math.BigInteger] = new JsonWriter[java.math.BigInteger] { - override def write(value: java.math.BigInteger, tokenWriter: TokenWriter): Unit = tokenWriter.writeNumber(value) - } - - implicit lazy val javaBooleanWriter: JsonWriter[java.lang.Boolean] = new JsonWriter[java.lang.Boolean] { - override def write(value: java.lang.Boolean, tokenWriter: TokenWriter): Unit = tokenWriter.writeBoolean(value) - } - - implicit lazy val uuidWriter: JsonWriter[java.util.UUID] = new JsonWriter[java.util.UUID] { - override def write(value: java.util.UUID, tokenWriter: TokenWriter): Unit = tokenWriter.writeString(value.toString) - } + override def write(value: String, tokenWriter: TokenWriter): Unit = + tokenWriter.writeString(value) + } + + implicit lazy val javaIntWriter: JsonWriter[java.lang.Integer] = + new JsonWriter[java.lang.Integer] { + override def write( + value: java.lang.Integer, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeNumber(value) + } + + implicit lazy val javaLongWriter: JsonWriter[java.lang.Long] = + new JsonWriter[java.lang.Long] { + override def write( + value: java.lang.Long, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeNumber(value) + } + + implicit lazy val javaShortWriter: JsonWriter[java.lang.Short] = + new JsonWriter[java.lang.Short] { + override def write( + value: java.lang.Short, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeNumber(value) + } + + implicit lazy val javaDoubleWriter: JsonWriter[java.lang.Double] = + new JsonWriter[java.lang.Double] { + override def write( + value: java.lang.Double, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeNumber(value) + } + + implicit lazy val javaFloatWriter: JsonWriter[java.lang.Float] = + new JsonWriter[java.lang.Float] { + override def write( + value: java.lang.Float, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeNumber(value) + } + + implicit lazy val javaBigDecimalWriter: JsonWriter[java.math.BigDecimal] = + new JsonWriter[java.math.BigDecimal] { + override def write( + value: java.math.BigDecimal, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeNumber(value) + } + + implicit lazy val javaBigIntegerWriter: JsonWriter[java.math.BigInteger] = + new JsonWriter[java.math.BigInteger] { + override def write( + value: java.math.BigInteger, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeNumber(value) + } + + implicit lazy val javaBooleanWriter: JsonWriter[java.lang.Boolean] = + new JsonWriter[java.lang.Boolean] { + override def write( + value: java.lang.Boolean, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeBoolean(value) + } + + implicit lazy val uuidWriter: JsonWriter[java.util.UUID] = + new JsonWriter[java.util.UUID] { + override def write( + value: java.util.UUID, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeString(value.toString) + } implicit lazy val nullWriter: JsonWriter[Null] = new JsonWriter[Null] { - override def write(value: Null, tokenWriter: TokenWriter): Unit = tokenWriter.writeNull() + override def write(value: Null, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNull() } } diff --git a/modules/core/src/main/scala/tethys/writers/instances/EitherWriters.scala b/modules/core/src/main/scala/tethys/writers/instances/EitherWriters.scala index d5bb422b..a07bdc00 100644 --- a/modules/core/src/main/scala/tethys/writers/instances/EitherWriters.scala +++ b/modules/core/src/main/scala/tethys/writers/instances/EitherWriters.scala @@ -4,8 +4,15 @@ import tethys.JsonWriter import tethys.writers.tokens.TokenWriter private[tethys] trait EitherWriters { - implicit def eitherWriter[L, R](implicit L: JsonWriter[L], R: JsonWriter[R]): JsonWriter[Either[L, R]] = new JsonWriter[Either[L, R]] { - override def write(name: String, value: Either[L, R], tokenWriter: TokenWriter): Unit = { + implicit def eitherWriter[L, R](implicit + L: JsonWriter[L], + R: JsonWriter[R] + ): JsonWriter[Either[L, R]] = new JsonWriter[Either[L, R]] { + override def write( + name: String, + value: Either[L, R], + tokenWriter: TokenWriter + ): Unit = { value match { case Left(left) => L.write(name, left, tokenWriter) case Right(right) => R.write(name, right, tokenWriter) diff --git a/modules/core/src/main/scala/tethys/writers/instances/IterableWriters.scala b/modules/core/src/main/scala/tethys/writers/instances/IterableWriters.scala index d6b718f4..82f0491e 100644 --- a/modules/core/src/main/scala/tethys/writers/instances/IterableWriters.scala +++ b/modules/core/src/main/scala/tethys/writers/instances/IterableWriters.scala @@ -6,18 +6,21 @@ import tethys.writers.tokens.TokenWriter import scala.language.higherKinds private[tethys] trait IterableWriters extends LowPriorityJsonWriters { - final implicit def iterableWriter[A, C[X] <: Iterable[X]](implicit valueWriter: JsonWriter[A]): JsonWriter[C[A]] = new IterableWriter[A, C](valueWriter) { + final implicit def iterableWriter[A, C[X] <: Iterable[X]](implicit + valueWriter: JsonWriter[A] + ): JsonWriter[C[A]] = new IterableWriter[A, C](valueWriter) { override def iterator(c: C[A]): Iterator[A] = c.iterator } - abstract class IterableWriter[A, C[_]](valueWriter: JsonWriter[A]) extends JsonWriter[C[A]] { + abstract class IterableWriter[A, C[_]](valueWriter: JsonWriter[A]) + extends JsonWriter[C[A]] { def iterator(c: C[A]): Iterator[A] override def write(value: C[A], tokenWriter: TokenWriter): Unit = { tokenWriter.writeArrayStart() val valueIterator = iterator(value) - while(valueIterator.hasNext) { + while (valueIterator.hasNext) { val v = valueIterator.next() valueWriter.write(v, tokenWriter) } @@ -25,4 +28,4 @@ private[tethys] trait IterableWriters extends LowPriorityJsonWriters { tokenWriter.writeArrayEnd() } } -} \ No newline at end of file +} diff --git a/modules/core/src/main/scala/tethys/writers/instances/LowPriorityJsonWriters.scala b/modules/core/src/main/scala/tethys/writers/instances/LowPriorityJsonWriters.scala index 02c13101..0471fcd2 100644 --- a/modules/core/src/main/scala/tethys/writers/instances/LowPriorityJsonWriters.scala +++ b/modules/core/src/main/scala/tethys/writers/instances/LowPriorityJsonWriters.scala @@ -4,7 +4,9 @@ import tethys._ import tethys.commons.LowPriorityInstance private[tethys] trait LowPriorityJsonWriters { - implicit final def lowPriorityWriter[A](implicit lowPriorityInstance: LowPriorityInstance[JsonObjectWriter[A]]): JsonWriter[A] = { + implicit final def lowPriorityWriter[A](implicit + lowPriorityInstance: LowPriorityInstance[JsonObjectWriter[A]] + ): JsonWriter[A] = { lowPriorityInstance.instance } -} \ No newline at end of file +} diff --git a/modules/core/src/main/scala/tethys/writers/instances/MapWriters.scala b/modules/core/src/main/scala/tethys/writers/instances/MapWriters.scala index fcc8dac7..89537434 100644 --- a/modules/core/src/main/scala/tethys/writers/instances/MapWriters.scala +++ b/modules/core/src/main/scala/tethys/writers/instances/MapWriters.scala @@ -5,10 +5,16 @@ import tethys.writers.KeyWriter import tethys.writers.tokens.TokenWriter private[tethys] trait MapWriters extends IterableWriters { - implicit def mapWriter[K, A](implicit keyWriter: KeyWriter[K], valueWriter: JsonWriter[A]): JsonObjectWriter[Map[K, A]] = new JsonObjectWriter[Map[K, A]] { - override def writeValues(value: Map[K, A], tokenWriter: TokenWriter): Unit = { + implicit def mapWriter[K, A](implicit + keyWriter: KeyWriter[K], + valueWriter: JsonWriter[A] + ): JsonObjectWriter[Map[K, A]] = new JsonObjectWriter[Map[K, A]] { + override def writeValues( + value: Map[K, A], + tokenWriter: TokenWriter + ): Unit = { val valueIterator = value.iterator - while(valueIterator.hasNext) { + while (valueIterator.hasNext) { val v = valueIterator.next() tokenWriter.writeFieldName(keyWriter.toKey(v._1)) valueWriter.write(v._2, tokenWriter) diff --git a/modules/core/src/main/scala/tethys/writers/instances/OptionWriters.scala b/modules/core/src/main/scala/tethys/writers/instances/OptionWriters.scala index 0aa7fc15..3047316e 100644 --- a/modules/core/src/main/scala/tethys/writers/instances/OptionWriters.scala +++ b/modules/core/src/main/scala/tethys/writers/instances/OptionWriters.scala @@ -4,27 +4,41 @@ import tethys.JsonWriter import tethys.writers.tokens.TokenWriter private[tethys] trait OptionWriters extends MapWriters { - implicit lazy val noneWriter: JsonWriter[None.type] = new JsonWriter[None.type] { - override def write(name: String, value: None.type, tokenWriter: TokenWriter): Unit = () - override def write(value: None.type, tokenWriter: TokenWriter): Unit = tokenWriter.writeNull() - } + implicit lazy val noneWriter: JsonWriter[None.type] = + new JsonWriter[None.type] { + override def write( + name: String, + value: None.type, + tokenWriter: TokenWriter + ): Unit = () + override def write(value: None.type, tokenWriter: TokenWriter): Unit = + tokenWriter.writeNull() + } - implicit def someWriter[A](implicit jsonWriter: JsonWriter[A]): JsonWriter[Some[A]] = new JsonWriter[Some[A]] { + implicit def someWriter[A](implicit + jsonWriter: JsonWriter[A] + ): JsonWriter[Some[A]] = new JsonWriter[Some[A]] { override def write(value: Some[A], tokenWriter: TokenWriter): Unit = { jsonWriter.write(value.get, tokenWriter) } } - implicit def optionalWriter[A](implicit valueWriter: JsonWriter[A]): JsonWriter[Option[A]] = new JsonWriter[Option[A]] { + implicit def optionalWriter[A](implicit + valueWriter: JsonWriter[A] + ): JsonWriter[Option[A]] = new JsonWriter[Option[A]] { - override def write(name: String, value: Option[A], tokenWriter: TokenWriter): Unit = { - if(value.nonEmpty) { + override def write( + name: String, + value: Option[A], + tokenWriter: TokenWriter + ): Unit = { + if (value.nonEmpty) { valueWriter.write(name, value.get, tokenWriter) } } override def write(value: Option[A], tokenWriter: TokenWriter): Unit = { - if(value.isEmpty) tokenWriter.writeNull() + if (value.isEmpty) tokenWriter.writeNull() else valueWriter.write(value.get, tokenWriter) } } diff --git a/modules/core/src/main/scala/tethys/writers/instances/SimpleJsonObjectWriter.scala b/modules/core/src/main/scala/tethys/writers/instances/SimpleJsonObjectWriter.scala index 5003c168..f780339b 100644 --- a/modules/core/src/main/scala/tethys/writers/instances/SimpleJsonObjectWriter.scala +++ b/modules/core/src/main/scala/tethys/writers/instances/SimpleJsonObjectWriter.scala @@ -6,11 +6,12 @@ import tethys.writers.tokens.TokenWriter import scala.collection.immutable -class SimpleJsonObjectWriter[A](val fields: Seq[JsonFieldObjectField[A, _]]) extends JsonObjectWriter[A] { +class SimpleJsonObjectWriter[A](val fields: Seq[JsonFieldObjectField[A, _]]) + extends JsonObjectWriter[A] { override def writeValues(value: A, tokenWriter: TokenWriter): Unit = { val it = fields.iterator - while(it.hasNext) { + while (it.hasNext) { it.next() match { case JsonFieldObjectField(name, fun, jsonWriter) => jsonWriter.write(name, fun.apply(value), tokenWriter) @@ -18,20 +19,34 @@ class SimpleJsonObjectWriter[A](val fields: Seq[JsonFieldObjectField[A, _]]) ext } } - def addField[B](name: String)(fun: A => B)(implicit jsonWriter: JsonWriter[B]): SimpleJsonObjectWriter[A] = { - SimpleJsonObjectWriter(fields :+ JsonFieldObjectField[A, B](name, fun, jsonWriter)) + def addField[B](name: String)( + fun: A => B + )(implicit jsonWriter: JsonWriter[B]): SimpleJsonObjectWriter[A] = { + SimpleJsonObjectWriter( + fields :+ JsonFieldObjectField[A, B](name, fun, jsonWriter) + ) } - def ++(that: SimpleJsonObjectWriter[A]): SimpleJsonObjectWriter[A] = concat(that) + def ++(that: SimpleJsonObjectWriter[A]): SimpleJsonObjectWriter[A] = concat( + that + ) - def concat(that: SimpleJsonObjectWriter[A]): SimpleJsonObjectWriter[A] = SimpleJsonObjectWriter(this.fields ++ that.fields) + def concat(that: SimpleJsonObjectWriter[A]): SimpleJsonObjectWriter[A] = + SimpleJsonObjectWriter(this.fields ++ that.fields) } object SimpleJsonObjectWriter { - def apply[A]: SimpleJsonObjectWriter[A] = new SimpleJsonObjectWriter[A](immutable.Queue.empty) + def apply[A]: SimpleJsonObjectWriter[A] = + new SimpleJsonObjectWriter[A](immutable.Queue.empty) - def apply[A](fields: Seq[JsonFieldObjectField[A, _]]): SimpleJsonObjectWriter[A] = new SimpleJsonObjectWriter[A](fields) + def apply[A]( + fields: Seq[JsonFieldObjectField[A, _]] + ): SimpleJsonObjectWriter[A] = new SimpleJsonObjectWriter[A](fields) - case class JsonFieldObjectField[A, B](name: String, fun: A => B, jsonWriter: JsonWriter[B]) + case class JsonFieldObjectField[A, B]( + name: String, + fun: A => B, + jsonWriter: JsonWriter[B] + ) } diff --git a/modules/core/src/main/scala/tethys/writers/tokens/SimpleTokenWriter.scala b/modules/core/src/main/scala/tethys/writers/tokens/SimpleTokenWriter.scala index c3827e16..1e8da4cc 100644 --- a/modules/core/src/main/scala/tethys/writers/tokens/SimpleTokenWriter.scala +++ b/modules/core/src/main/scala/tethys/writers/tokens/SimpleTokenWriter.scala @@ -10,37 +10,65 @@ import scala.collection.mutable class SimpleTokenWriter extends TokenWriter { val tokens: mutable.ArrayBuffer[TokenNode] = mutable.ArrayBuffer.empty - override def writeArrayStart(): SimpleTokenWriter.this.type = append(ArrayStartNode) + override def writeArrayStart(): SimpleTokenWriter.this.type = append( + ArrayStartNode + ) - override def writeArrayEnd(): SimpleTokenWriter.this.type = append(ArrayEndNode) + override def writeArrayEnd(): SimpleTokenWriter.this.type = append( + ArrayEndNode + ) - override def writeObjectStart(): SimpleTokenWriter.this.type = append(ObjectStartNode) + override def writeObjectStart(): SimpleTokenWriter.this.type = append( + ObjectStartNode + ) - override def writeObjectEnd(): SimpleTokenWriter.this.type = append(ObjectEndNode) + override def writeObjectEnd(): SimpleTokenWriter.this.type = append( + ObjectEndNode + ) - override def writeFieldName(name: String): SimpleTokenWriter.this.type = append(FieldNameNode(name)) + override def writeFieldName(name: String): SimpleTokenWriter.this.type = + append(FieldNameNode(name)) - override def writeString(v: String): SimpleTokenWriter.this.type = append(StringValueNode(v)) + override def writeString(v: String): SimpleTokenWriter.this.type = append( + StringValueNode(v) + ) - override def writeNumber(v: Short): SimpleTokenWriter.this.type = append(ShortValueNode(v)) + override def writeNumber(v: Short): SimpleTokenWriter.this.type = append( + ShortValueNode(v) + ) - override def writeNumber(v: Int): SimpleTokenWriter.this.type = append(IntValueNode(v)) + override def writeNumber(v: Int): SimpleTokenWriter.this.type = append( + IntValueNode(v) + ) - override def writeNumber(v: Long): SimpleTokenWriter.this.type = append(LongValueNode(v)) + override def writeNumber(v: Long): SimpleTokenWriter.this.type = append( + LongValueNode(v) + ) - override def writeNumber(v: BigInt): SimpleTokenWriter.this.type = append(NumberValueNode(v)) + override def writeNumber(v: BigInt): SimpleTokenWriter.this.type = append( + NumberValueNode(v) + ) - override def writeNumber(v: Double): SimpleTokenWriter.this.type = append(DoubleValueNode(v)) + override def writeNumber(v: Double): SimpleTokenWriter.this.type = append( + DoubleValueNode(v) + ) - override def writeNumber(v: Float): SimpleTokenWriter.this.type = append(FloatValueNode(v)) + override def writeNumber(v: Float): SimpleTokenWriter.this.type = append( + FloatValueNode(v) + ) - override def writeNumber(v: BigDecimal): SimpleTokenWriter.this.type = append(NumberValueNode(v)) + override def writeNumber(v: BigDecimal): SimpleTokenWriter.this.type = append( + NumberValueNode(v) + ) - override def writeBoolean(v: Boolean): SimpleTokenWriter.this.type = append(BooleanValueNode(v)) + override def writeBoolean(v: Boolean): SimpleTokenWriter.this.type = append( + BooleanValueNode(v) + ) override def writeNull(): SimpleTokenWriter.this.type = append(NullValueNode) - override def writeRawJson(json: String): SimpleTokenWriter.this.type = throw new UnsupportedOperationException("SimpleTokenWriter.writeRawJson") + override def writeRawJson(json: String): SimpleTokenWriter.this.type = + throw new UnsupportedOperationException("SimpleTokenWriter.writeRawJson") override def close(): Unit = () @@ -51,7 +79,9 @@ class SimpleTokenWriter extends TokenWriter { this } - def withRawJsonSupport(implicit producer: TokenIteratorProducer): SimpleTokenWriter = new SimpleTokenWriter { + def withRawJsonSupport(implicit + producer: TokenIteratorProducer + ): SimpleTokenWriter = new SimpleTokenWriter { import tethys._ override def writeRawJson(json: String): this.type = { val tokenIterator = json.toTokenIterator.fold(throw _, identity) diff --git a/modules/core/src/main/scala/tethys/writers/tokens/TokenWriter.scala b/modules/core/src/main/scala/tethys/writers/tokens/TokenWriter.scala index 834a109c..9cc88790 100644 --- a/modules/core/src/main/scala/tethys/writers/tokens/TokenWriter.scala +++ b/modules/core/src/main/scala/tethys/writers/tokens/TokenWriter.scala @@ -29,15 +29,15 @@ trait TokenWriter { def writeRawNumber(n: Number): this.type = n match { case jbd: java.math.BigDecimal => writeNumber(BigDecimal(jbd)) - case jint: java.lang.Integer => writeNumber(jint.intValue()) - case jshort: java.lang.Short => writeNumber(jshort.longValue()) - case jlong: java.lang.Long => writeNumber(jlong.longValue()) + case jint: java.lang.Integer => writeNumber(jint.intValue()) + case jshort: java.lang.Short => writeNumber(jshort.longValue()) + case jlong: java.lang.Long => writeNumber(jlong.longValue()) case jbi: java.math.BigInteger => writeNumber(BigInt(jbi)) - case jfloat: java.lang.Float => writeNumber(jfloat.floatValue()) + case jfloat: java.lang.Float => writeNumber(jfloat.floatValue()) case jdouble: java.lang.Double => writeNumber(jdouble.doubleValue()) - case bd: BigDecimal => writeNumber(bd) - case bi: BigInt => writeNumber(bi) - case num => writeNumber(num.doubleValue()) + case bd: BigDecimal => writeNumber(bd) + case bi: BigInt => writeNumber(bi) + case num => writeNumber(num.doubleValue()) } def writeBoolean(v: Boolean): this.type diff --git a/modules/core/src/test/scala/tethys/readers/DefaultReadersTest.scala b/modules/core/src/test/scala/tethys/readers/DefaultReadersTest.scala index fe6f66f5..23f5dfd0 100644 --- a/modules/core/src/test/scala/tethys/readers/DefaultReadersTest.scala +++ b/modules/core/src/test/scala/tethys/readers/DefaultReadersTest.scala @@ -14,41 +14,48 @@ import scala.reflect.ClassTag class DefaultReadersTest extends AnyFlatSpec { private val randomUUID = java.util.UUID.randomUUID() - private def test[A](result: A)(implicit jsonReader: JsonReader[A], ct: ClassTag[A]): TestDefinition[A] = { + private def test[A]( + result: A + )(implicit jsonReader: JsonReader[A], ct: ClassTag[A]): TestDefinition[A] = { TestDefinition(result, jsonReader, ct.toString()) } - private def test[A](result: A, name: String)(implicit jsonReader: JsonReader[A]): TestDefinition[A] = { + private def test[A](result: A, name: String)(implicit + jsonReader: JsonReader[A] + ): TestDefinition[A] = { TestDefinition(result, jsonReader, name) } - private val cases: List[(TestDefinition[_], List[TokenNode])] = List[(TestDefinition[_], List[TokenNode])]( - test("1") -> value("1"), - test(1) -> value(1), - test(1: Short) -> value(1: Short), - test(1L) -> value(1L), - test(1f) -> value(1f), - test(1d) -> value(1d), - test(1: BigDecimal) -> value(1: BigDecimal), - test(true, "true") -> value(true), - test(false, "false") -> value(false), - test(List(1, 2, 3)) -> arr(1, 2, 3), - test(List[Int](), "Seq.empty") -> arr(), - test(Map("a" -> 1, "b" -> 2)) -> obj("a" -> 1, "b" -> 2), - test(Map(randomUUID -> 1),"Map with UUID keys") -> obj(randomUUID.toString -> 1), - test(Map(1L -> 1), "Map with Long keys") -> obj("1" -> 1), - test(Map(1 -> 1), "Map with Int keys") -> obj("1" -> 1), - test(Option(1), "Option.nonEmpty") -> value(1), - test(Option.empty[Int], "Option.empty") -> List(NullValueNode) , - test(1: java.lang.Integer) -> value(1), - test(java.lang.Short.valueOf(1: Short)) -> value(1: Short), - test(1L: java.lang.Long) -> value(1L), - test(1f: java.lang.Float) -> value(1f), - test(1d: java.lang.Double) -> value(1d), - test(java.math.BigDecimal.valueOf(1)) -> value(1: BigDecimal), - test(java.math.BigInteger.valueOf(1)) -> value(1: BigInt), - test(randomUUID) -> value(randomUUID.toString) - ) + private val cases: List[(TestDefinition[_], List[TokenNode])] = + List[(TestDefinition[_], List[TokenNode])]( + test("1") -> value("1"), + test(1) -> value(1), + test(1: Short) -> value(1: Short), + test(1L) -> value(1L), + test(1f) -> value(1f), + test(1d) -> value(1d), + test(1: BigDecimal) -> value(1: BigDecimal), + test(true, "true") -> value(true), + test(false, "false") -> value(false), + test(List(1, 2, 3)) -> arr(1, 2, 3), + test(List[Int](), "Seq.empty") -> arr(), + test(Map("a" -> 1, "b" -> 2)) -> obj("a" -> 1, "b" -> 2), + test(Map(randomUUID -> 1), "Map with UUID keys") -> obj( + randomUUID.toString -> 1 + ), + test(Map(1L -> 1), "Map with Long keys") -> obj("1" -> 1), + test(Map(1 -> 1), "Map with Int keys") -> obj("1" -> 1), + test(Option(1), "Option.nonEmpty") -> value(1), + test(Option.empty[Int], "Option.empty") -> List(NullValueNode), + test(1: java.lang.Integer) -> value(1), + test(java.lang.Short.valueOf(1: Short)) -> value(1: Short), + test(1L: java.lang.Long) -> value(1L), + test(1f: java.lang.Float) -> value(1f), + test(1d: java.lang.Double) -> value(1d), + test(java.math.BigDecimal.valueOf(1)) -> value(1: BigDecimal), + test(java.math.BigInteger.valueOf(1)) -> value(1: BigInt), + test(randomUUID) -> value(randomUUID.toString) + ) behavior of "Default readers" @@ -64,9 +71,12 @@ class DefaultReadersTest extends AnyFlatSpec { fail("oops") } - } object DefaultReadersTest { - case class TestDefinition[A](result: A, jsonReader: JsonReader[A], name: String) + case class TestDefinition[A]( + result: A, + jsonReader: JsonReader[A], + name: String + ) } diff --git a/modules/core/src/test/scala/tethys/readers/JsonReaderBuilderTest.scala b/modules/core/src/test/scala/tethys/readers/JsonReaderBuilderTest.scala index 9cb96934..ec1a5e3e 100644 --- a/modules/core/src/test/scala/tethys/readers/JsonReaderBuilderTest.scala +++ b/modules/core/src/test/scala/tethys/readers/JsonReaderBuilderTest.scala @@ -67,24 +67,24 @@ class JsonReaderBuilderTest extends AnyFlatSpec with Matchers { .buildReader(FatClass.apply) } - read[FatClass](obj( - "a" -> 1, - "b" -> "s", - "c" -> true, - "d" -> arr("a", "b", "c"), - "e" -> 4 - )) shouldBe FatClass( + read[FatClass]( + obj( + "a" -> 1, + "b" -> "s", + "c" -> true, + "d" -> arr("a", "b", "c"), + "e" -> 4 + ) + ) shouldBe FatClass( a = 1, b = "s", c = true, d = Seq("a", "b", "c"), - e = 4.0D, + e = 4.0d, opt = None ) } - - it should "build strict reader from fields" in { implicit val reader: JsonReader[B] = { JsonReader.builder @@ -92,12 +92,43 @@ class JsonReaderBuilderTest extends AnyFlatSpec with Matchers { .buildStrictReader(i => B(i.getOrElse(0))) } - val thrown = the [ReaderError] thrownBy read[B](obj("j" -> 1)) - thrown.getMessage should equal ("Illegal json at '[ROOT]': unexpected field 'j', expected one of 'i'") + val thrown = the[ReaderError] thrownBy read[B](obj("j" -> 1)) + thrown.getMessage should equal( + "Illegal json at '[ROOT]': unexpected field 'j', expected one of 'i'" + ) } it should "allow to build reader with more than 22 fields" in { - implicit val reader: JsonReader[((Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int), Int, Int)] = { + implicit val reader: JsonReader[ + ( + ( + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ), + Int, + Int + ) + ] = { JsonReader.builder .addField[Int]("f1") .addField[Int]("f2") @@ -126,32 +157,35 @@ class JsonReaderBuilderTest extends AnyFlatSpec with Matchers { .buildReader((tuple, f23, f24) => (tuple, f23, f24)) } - read(obj( - "f1" -> 1, - "f2" -> 2, - "f3" -> 3, - "f4" -> 4, - "f5" -> 5, - "f6" -> 6, - "f7" -> 7, - "f8" -> 8, - "f9" -> 9, - "f10" -> 10, - "f11" -> 11, - "f12" -> 12, - "f13" -> 13, - "f14" -> 14, - "f15" -> 15, - "f16" -> 16, - "f17" -> 17, - "f18" -> 18, - "f19" -> 19, - "f20" -> 20, - "f21" -> 21, - "f22" -> 22, - "f23" -> 23, - "f24" -> 24 - ))(reader) shouldBe ((1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ,19 ,20 ,21 ,22), 23, 24) + read( + obj( + "f1" -> 1, + "f2" -> 2, + "f3" -> 3, + "f4" -> 4, + "f5" -> 5, + "f6" -> 6, + "f7" -> 7, + "f8" -> 8, + "f9" -> 9, + "f10" -> 10, + "f11" -> 11, + "f12" -> 12, + "f13" -> 13, + "f14" -> 14, + "f15" -> 15, + "f16" -> 16, + "f17" -> 17, + "f18" -> 18, + "f19" -> 19, + "f20" -> 20, + "f21" -> 21, + "f22" -> 22, + "f23" -> 23, + "f24" -> 24 + ) + )(reader) shouldBe ((1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22), 23, 24) } } @@ -160,10 +194,12 @@ object JsonReaderBuilderTest { case class B(i: Int) extends A case class C(s: String) extends A - case class FatClass(a: Int, - b: String, - c: Boolean, - d: Seq[String], - e: Double, - opt: Option[Int]) + case class FatClass( + a: Int, + b: String, + c: Boolean, + d: Seq[String], + e: Double, + opt: Option[Int] + ) } diff --git a/modules/core/src/test/scala/tethys/readers/QueueIteratorTest.scala b/modules/core/src/test/scala/tethys/readers/QueueIteratorTest.scala index 1933a9ac..79c7aaa9 100644 --- a/modules/core/src/test/scala/tethys/readers/QueueIteratorTest.scala +++ b/modules/core/src/test/scala/tethys/readers/QueueIteratorTest.scala @@ -112,7 +112,6 @@ class QueueIteratorTest extends AnyFlatSpec with Matchers { b.nextToken().isArrayEnd shouldBe true b.nextToken().isEmpty shouldBe true - it.currentToken().isObjectEnd shouldBe true it.nextToken().isEmpty shouldBe true diff --git a/modules/core/src/test/scala/tethys/writers/DefaultWritersTest.scala b/modules/core/src/test/scala/tethys/writers/DefaultWritersTest.scala index ffc26fb0..7e95307e 100644 --- a/modules/core/src/test/scala/tethys/writers/DefaultWritersTest.scala +++ b/modules/core/src/test/scala/tethys/writers/DefaultWritersTest.scala @@ -13,44 +13,53 @@ import scala.reflect.ClassTag class DefaultWritersTest extends AnyFlatSpec { private val randomUUID = java.util.UUID.randomUUID() - private def test[A](value: A)(implicit jsonWriter: JsonWriter[A], ct: ClassTag[A]): TestDefinition[A] = { + private def test[A]( + value: A + )(implicit jsonWriter: JsonWriter[A], ct: ClassTag[A]): TestDefinition[A] = { TestDefinition(value, jsonWriter, ct.toString()) } - private def test[A](value: A, name: String)(implicit jsonWriter: JsonWriter[A]): TestDefinition[A] = { + private def test[A](value: A, name: String)(implicit + jsonWriter: JsonWriter[A] + ): TestDefinition[A] = { TestDefinition(value, jsonWriter, name) } - private val cases: List[(TestDefinition[_], List[TokenNode])] = List[(TestDefinition[_], List[TokenNode])]( - test("1") -> value("1"), - test(1) -> value(1), - test(1: Short) -> value(1: Short), - test(1L) -> value(1L), - test(1f) -> value(1f), - test(1d) -> value(1d), - test(1: BigDecimal) -> value(1: BigDecimal), - test(1: BigInt) -> value(1: BigInt), - test(true, "true") -> value(true), - test(false, "false") -> value(false), - test(List(1, 2, 3)) -> arr(1, 2, 3), - test(List[Int](), "Seq.empty") -> arr(), - test(Map("a" -> 1, "b" -> 2)) -> obj("a" -> 1, "b" -> 2), - test(Map(randomUUID -> 1),"Map with UUID keys") -> obj(randomUUID.toString -> 1), - test(Map(1L -> 1), "Map with Long keys") -> obj("1" -> 1), - test(Map(1 -> 1), "Map with Int keys") -> obj("1" -> 1), - test(Option(1), "Option.nonEmpty") -> value(1), - test(Option.empty[Int], "Option.empty") -> List(NullValueNode), - test(Right(1): Either[String, Int], "Either.right") -> value(1), - test(Left("Not an Int"): Either[String, Int], "Either.left") -> value("Not an Int"), - test(1: java.lang.Integer) -> value(1), - test(java.lang.Short.valueOf(1: Short)) -> value(1: Short), - test(1L: java.lang.Long) -> value(1L), - test(1f: java.lang.Float) -> value(1f), - test(1d: java.lang.Double) -> value(1d), - test(java.math.BigDecimal.valueOf(1)) -> value(1: BigDecimal), - test(java.math.BigInteger.valueOf(1)) -> value(1: BigInt), - test(randomUUID) -> value(randomUUID.toString) - ) + private val cases: List[(TestDefinition[_], List[TokenNode])] = + List[(TestDefinition[_], List[TokenNode])]( + test("1") -> value("1"), + test(1) -> value(1), + test(1: Short) -> value(1: Short), + test(1L) -> value(1L), + test(1f) -> value(1f), + test(1d) -> value(1d), + test(1: BigDecimal) -> value(1: BigDecimal), + test(1: BigInt) -> value(1: BigInt), + test(true, "true") -> value(true), + test(false, "false") -> value(false), + test(List(1, 2, 3)) -> arr(1, 2, 3), + test(List[Int](), "Seq.empty") -> arr(), + test(Map("a" -> 1, "b" -> 2)) -> obj("a" -> 1, "b" -> 2), + test(Map(randomUUID -> 1), "Map with UUID keys") -> obj( + randomUUID.toString -> 1 + ), + test(Map(1L -> 1), "Map with Long keys") -> obj("1" -> 1), + test(Map(1 -> 1), "Map with Int keys") -> obj("1" -> 1), + test(Option(1), "Option.nonEmpty") -> value(1), + test(Option.empty[Int], "Option.empty") -> List(NullValueNode), + test(Right(1): Either[String, Int], "Either.right") -> value(1), + test(Left("Not an Int"): Either[String, Int], "Either.left") -> value( + "Not an Int" + ), + test(1: java.lang.Integer) -> value(1), + test(java.lang.Short.valueOf(1: Short)) -> value(1: Short), + test(1L: java.lang.Long) -> value(1L), + test(1f: java.lang.Float) -> value(1f), + test(1d: java.lang.Double) -> value(1d), + test(java.math.BigDecimal.valueOf(1)) -> value(1: BigDecimal), + test(java.math.BigInteger.valueOf(1)) -> value(1: BigInt), + test(randomUUID) -> value(randomUUID.toString) + ) behavior of "Default writers" @@ -64,9 +73,12 @@ class DefaultWritersTest extends AnyFlatSpec { fail("oops") } - } object DefaultWritersTest { - case class TestDefinition[A](value: A, jsonWriter: JsonWriter[A], name: String) + case class TestDefinition[A]( + value: A, + jsonWriter: JsonWriter[A], + name: String + ) } diff --git a/modules/core/src/test/scala/tethys/writers/SimpleJsonObjectWriterTest.scala b/modules/core/src/test/scala/tethys/writers/SimpleJsonObjectWriterTest.scala index ab310da0..685649e6 100644 --- a/modules/core/src/test/scala/tethys/writers/SimpleJsonObjectWriterTest.scala +++ b/modules/core/src/test/scala/tethys/writers/SimpleJsonObjectWriterTest.scala @@ -13,7 +13,8 @@ class SimpleJsonObjectWriterTest extends AnyFlatSpec { it should "write correct object to TokenWriter" in { implicit val testWriter: SimpleJsonObjectWriter[TestData] = { - JsonWriter.obj[TestData] + JsonWriter + .obj[TestData] .addField("a")(_.a) .addField("b")(_.b) .addField("c")(_.b.isEmpty) @@ -28,7 +29,9 @@ class SimpleJsonObjectWriterTest extends AnyFlatSpec { it should "write correct object to TokenWriter for concatenated writers" in { implicit val testWriter: JsonObjectWriter[TestData] = { - JsonWriter.obj[TestData].addField("a")(_.a) + JsonWriter + .obj[TestData] + .addField("a")(_.a) .concat(JsonWriter.obj[TestData].addField("b")(_.b)) .addField("c")(_.b.isEmpty) } diff --git a/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysEnum.scala b/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysEnum.scala index 79829924..e4ca42b8 100644 --- a/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysEnum.scala +++ b/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysEnum.scala @@ -6,4 +6,4 @@ import tethys.{JsonReader, JsonWriter} trait TethysEnum[A <: EnumEntry] { _: Enum[A] => implicit val tethysReader: JsonReader[A] = Enumeratum.reader(this) implicit val tethysWriter: JsonWriter[A] = Enumeratum.writer(this) -} \ No newline at end of file +} diff --git a/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysKeyEnum.scala b/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysKeyEnum.scala index 6720f992..a2d7e4ae 100644 --- a/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysKeyEnum.scala +++ b/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysKeyEnum.scala @@ -5,6 +5,7 @@ import tethys.readers.KeyReader import tethys.writers.KeyWriter trait TethysKeyEnum[A <: EnumEntry] { _: Enum[A] => - implicit val tethysKeyReader: KeyReader[A] = Enumeratum.keyReader(this)(_.withNameOption) + implicit val tethysKeyReader: KeyReader[A] = + Enumeratum.keyReader(this)(_.withNameOption) implicit val tethysKeyWriter: KeyWriter[A] = Enumeratum.keyWriter(_.entryName) -} \ No newline at end of file +} diff --git a/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysValueEnum.scala b/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysValueEnum.scala index fc3a68e9..7a2669c2 100644 --- a/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysValueEnum.scala +++ b/modules/enumeratum/src/main/scala-2.13+/tethys/enumeratum/TethysValueEnum.scala @@ -5,29 +5,37 @@ import tethys.readers.KeyReader import tethys.writers.KeyWriter import tethys.{JsonReader, JsonWriter} -sealed trait TethysValueEnum[ValueType, EntryType <: ValueEnumEntry[ValueType]] { _: ValueEnum[ValueType, EntryType] => +sealed trait TethysValueEnum[ + ValueType, + EntryType <: ValueEnumEntry[ValueType] +] { _: ValueEnum[ValueType, EntryType] => implicit def tethysReader: JsonReader[EntryType] implicit def tethysWriter: JsonWriter[EntryType] } -trait StringTethysEnum[E <: StringEnumEntry] extends TethysValueEnum[String, E] { _: ValueEnum[String, E] => +trait StringTethysEnum[E <: StringEnumEntry] + extends TethysValueEnum[String, E] { _: ValueEnum[String, E] => implicit val tethysReader: JsonReader[E] = Enumeratum.valueReader(this) implicit val tethysWriter: JsonWriter[E] = Enumeratum.valueWriter(this) - implicit val tethysKeyReader: KeyReader[E] = Enumeratum.keyReader(this)(_.withValueOpt) + implicit val tethysKeyReader: KeyReader[E] = + Enumeratum.keyReader(this)(_.withValueOpt) implicit val tethysKeyWriter: KeyWriter[E] = Enumeratum.keyWriter(_.value) } -trait IntTethysEnum[E <: IntEnumEntry] extends TethysValueEnum[Int, E] { _: ValueEnum[Int, E] => +trait IntTethysEnum[E <: IntEnumEntry] extends TethysValueEnum[Int, E] { + _: ValueEnum[Int, E] => implicit val tethysReader: JsonReader[E] = Enumeratum.valueReader(this) implicit val tethysWriter: JsonWriter[E] = Enumeratum.valueWriter(this) } -trait LongTethysEnum[E <: LongEnumEntry] extends TethysValueEnum[Long, E] { _: ValueEnum[Long, E] => +trait LongTethysEnum[E <: LongEnumEntry] extends TethysValueEnum[Long, E] { + _: ValueEnum[Long, E] => implicit val tethysReader: JsonReader[E] = Enumeratum.valueReader(this) implicit val tethysWriter: JsonWriter[E] = Enumeratum.valueWriter(this) } -trait ShortTethysEnum[E <: ShortEnumEntry] extends TethysValueEnum[Short, E] { _: ValueEnum[Short, E] => +trait ShortTethysEnum[E <: ShortEnumEntry] extends TethysValueEnum[Short, E] { + _: ValueEnum[Short, E] => implicit val tethysReader: JsonReader[E] = Enumeratum.valueReader(this) implicit val tethysWriter: JsonWriter[E] = Enumeratum.valueWriter(this) -} \ No newline at end of file +} diff --git a/modules/enumeratum/src/test/scala-2.13+/tethys/enumeratum/Direction.scala b/modules/enumeratum/src/test/scala-2.13+/tethys/enumeratum/Direction.scala index 4d7a694a..1eabbc1f 100644 --- a/modules/enumeratum/src/test/scala-2.13+/tethys/enumeratum/Direction.scala +++ b/modules/enumeratum/src/test/scala-2.13+/tethys/enumeratum/Direction.scala @@ -3,11 +3,14 @@ package tethys.enumeratum import enumeratum.{Enum, EnumEntry} sealed trait Direction extends EnumEntry -case object Direction extends Enum[Direction] with TethysEnum[Direction] with TethysKeyEnum[Direction] { - case object Up extends Direction - case object Down extends Direction - case object Left extends Direction +case object Direction + extends Enum[Direction] + with TethysEnum[Direction] + with TethysKeyEnum[Direction] { + case object Up extends Direction + case object Down extends Direction + case object Left extends Direction case object Right extends Direction val values = findValues -} \ No newline at end of file +} diff --git a/modules/enumeratum/src/test/scala-2.13+/tethys/enumeratum/EnumeratumSupportTest.scala b/modules/enumeratum/src/test/scala-2.13+/tethys/enumeratum/EnumeratumSupportTest.scala index 0c2f72dc..0f2da228 100644 --- a/modules/enumeratum/src/test/scala-2.13+/tethys/enumeratum/EnumeratumSupportTest.scala +++ b/modules/enumeratum/src/test/scala-2.13+/tethys/enumeratum/EnumeratumSupportTest.scala @@ -9,7 +9,10 @@ import tethys.commons.TokenNode.{value => token, _} import tethys.readers.{FieldName, ReaderError} import tethys.writers.tokens.SimpleTokenWriter._ -class EnumeratumSupportTest extends AnyFlatSpec with Matchers with EitherValues { +class EnumeratumSupportTest + extends AnyFlatSpec + with Matchers + with EitherValues { behavior of "TethysEnum" it should "work for encode" in { @@ -27,27 +30,47 @@ class EnumeratumSupportTest extends AnyFlatSpec with Matchers with EitherValues it should "fail for decode with unknown value" in { implicit val field = FieldName().appendFieldName("direction") - (the [ReaderError] thrownBy obj("direction" -> "Wat").tokensAs[Data]).getMessage shouldBe - ReaderError.catchNonFatal(ReaderError.wrongJson("Wat is not a member of enum Direction")).left.value.getMessage + (the[ReaderError] thrownBy obj("direction" -> "Wat") + .tokensAs[Data]).getMessage shouldBe + ReaderError + .catchNonFatal( + ReaderError.wrongJson("Wat is not a member of enum Direction") + ) + .left + .value + .getMessage - for (json <- List(token(1), token(1.0), token("null"), token(false), obj(), arr())) { + for ( + json <- List( + token(1), + token(1.0), + token("null"), + token(false), + obj(), + arr() + ) + ) { Try(json.tokensAs[Direction]).toOption shouldBe None } } - behavior of "TethysKeyEnum" // FIXME Type Inference doesn't work somehow w/o typehint val directions: Map[Direction, Int] = Map( - Direction.Up -> 1, - Direction.Down -> 2, - Direction.Left -> 3, + Direction.Up -> 1, + Direction.Down -> 2, + Direction.Left -> 3, Direction.Right -> 4 ) it should "work for encode" in { - directions.asTokenList shouldBe obj("Up" -> token(1), "Down" -> token(2), "Left" -> token(3), "Right" -> token(4)) + directions.asTokenList shouldBe obj( + "Up" -> token(1), + "Down" -> token(2), + "Left" -> token(3), + "Right" -> token(4) + ) } it should "work for decode" in { diff --git a/modules/jackson-backend/src/main/scala/tethys/jackson/JacksonTokenIterator.scala b/modules/jackson-backend/src/main/scala/tethys/jackson/JacksonTokenIterator.scala index 7a0ed4fc..d919939e 100644 --- a/modules/jackson-backend/src/main/scala/tethys/jackson/JacksonTokenIterator.scala +++ b/modules/jackson-backend/src/main/scala/tethys/jackson/JacksonTokenIterator.scala @@ -7,14 +7,15 @@ import tethys.readers.tokens.{BaseTokenIterator, TokenIterator} import scala.annotation.switch -final class JacksonTokenIterator(jsonParser: JsonParser) extends BaseTokenIterator { +final class JacksonTokenIterator(jsonParser: JsonParser) + extends BaseTokenIterator { private[this] var token: Token = fromId(jsonParser.currentTokenId()) override def currentToken(): Token = token override def nextToken(): Token = { val t = jsonParser.nextToken() token = { - if(t == null) Token.Empty + if (t == null) Token.Empty else fromId(t.id()) } token @@ -40,23 +41,23 @@ final class JacksonTokenIterator(jsonParser: JsonParser) extends BaseTokenIterat private def fromId(tokenId: Int): Token = (tokenId: @switch) match { case JsonTokenId.ID_START_OBJECT => ObjectStartToken - case JsonTokenId.ID_END_OBJECT => ObjectEndToken - case JsonTokenId.ID_START_ARRAY => ArrayStartToken - case JsonTokenId.ID_END_ARRAY => ArrayEndToken - case JsonTokenId.ID_FIELD_NAME => FieldNameToken - case JsonTokenId.ID_STRING => StringValueToken - case JsonTokenId.ID_NUMBER_INT => NumberValueToken + case JsonTokenId.ID_END_OBJECT => ObjectEndToken + case JsonTokenId.ID_START_ARRAY => ArrayStartToken + case JsonTokenId.ID_END_ARRAY => ArrayEndToken + case JsonTokenId.ID_FIELD_NAME => FieldNameToken + case JsonTokenId.ID_STRING => StringValueToken + case JsonTokenId.ID_NUMBER_INT => NumberValueToken case JsonTokenId.ID_NUMBER_FLOAT => NumberValueToken - case JsonTokenId.ID_TRUE => BooleanValueToken - case JsonTokenId.ID_FALSE => BooleanValueToken - case JsonTokenId.ID_NULL => NullValueToken - case _ => Token.Empty + case JsonTokenId.ID_TRUE => BooleanValueToken + case JsonTokenId.ID_FALSE => BooleanValueToken + case JsonTokenId.ID_NULL => NullValueToken + case _ => Token.Empty } } object JacksonTokenIterator { def fromFreshParser(parser: JsonParser): TokenIterator = { - parser.nextToken()// move parser to first token + parser.nextToken() // move parser to first token new JacksonTokenIterator(parser) } -} \ No newline at end of file +} diff --git a/modules/jackson-backend/src/main/scala/tethys/jackson/package.scala b/modules/jackson-backend/src/main/scala/tethys/jackson/package.scala index 472cccc8..78720394 100644 --- a/modules/jackson-backend/src/main/scala/tethys/jackson/package.scala +++ b/modules/jackson-backend/src/main/scala/tethys/jackson/package.scala @@ -14,16 +14,23 @@ package object jackson { f } - - implicit def jacksonTokenWriterProducer(implicit jsonFactory: JsonFactory = defaultJsonFactory): TokenWriterProducer = new TokenWriterProducer { + implicit def jacksonTokenWriterProducer(implicit + jsonFactory: JsonFactory = defaultJsonFactory + ): TokenWriterProducer = new TokenWriterProducer { override def forWriter(writer: Writer): TokenWriter = { new JacksonTokenWriter(jsonFactory.createGenerator(writer)) } } - implicit def jacksonTokenIteratorProducer(implicit jsonFactory: JsonFactory = defaultJsonFactory): TokenIteratorProducer = new TokenIteratorProducer { - override def fromReader(reader: Reader): Either[ReaderError, TokenIterator] = { - ReaderError.catchNonFatal(JacksonTokenIterator.fromFreshParser(jsonFactory.createParser(reader)))(FieldName()) + implicit def jacksonTokenIteratorProducer(implicit + jsonFactory: JsonFactory = defaultJsonFactory + ): TokenIteratorProducer = new TokenIteratorProducer { + override def fromReader( + reader: Reader + ): Either[ReaderError, TokenIterator] = { + ReaderError.catchNonFatal( + JacksonTokenIterator.fromFreshParser(jsonFactory.createParser(reader)) + )(FieldName()) } } } diff --git a/modules/jackson-backend/src/main/scala/tethys/jackson/pretty/package.scala b/modules/jackson-backend/src/main/scala/tethys/jackson/pretty/package.scala index f7183779..6bb86bd3 100644 --- a/modules/jackson-backend/src/main/scala/tethys/jackson/pretty/package.scala +++ b/modules/jackson-backend/src/main/scala/tethys/jackson/pretty/package.scala @@ -7,12 +7,18 @@ import tethys.readers.tokens.TokenIteratorProducer import tethys.writers.tokens.{TokenWriter, TokenWriterProducer} package object pretty { - implicit def prettyJacksonTokenWriterProducer(implicit jsonFactory: JsonFactory = defaultJsonFactory): TokenWriterProducer = new TokenWriterProducer { + implicit def prettyJacksonTokenWriterProducer(implicit + jsonFactory: JsonFactory = defaultJsonFactory + ): TokenWriterProducer = new TokenWriterProducer { override def forWriter(writer: Writer): TokenWriter = { - new JacksonTokenWriter(jsonFactory.createGenerator(writer).useDefaultPrettyPrinter()) + new JacksonTokenWriter( + jsonFactory.createGenerator(writer).useDefaultPrettyPrinter() + ) } } - implicit def jacksonTokenIteratorProducer(implicit jsonFactory: JsonFactory = defaultJsonFactory): TokenIteratorProducer = + implicit def jacksonTokenIteratorProducer(implicit + jsonFactory: JsonFactory = defaultJsonFactory + ): TokenIteratorProducer = tethys.jackson.jacksonTokenIteratorProducer } diff --git a/modules/jackson-backend/src/test/scala/tethys/jackson/JacksonTokenIteratorTest.scala b/modules/jackson-backend/src/test/scala/tethys/jackson/JacksonTokenIteratorTest.scala index db373092..060b7b89 100644 --- a/modules/jackson-backend/src/test/scala/tethys/jackson/JacksonTokenIteratorTest.scala +++ b/modules/jackson-backend/src/test/scala/tethys/jackson/JacksonTokenIteratorTest.scala @@ -104,7 +104,6 @@ class JacksonTokenIteratorTest extends AnyFlatSpec with Matchers { b.nextToken().isArrayEnd shouldBe true b.nextToken().isEmpty shouldBe true - it.currentToken().isObjectEnd shouldBe true it.nextToken().isEmpty shouldBe true diff --git a/modules/jackson-backend/src/test/scala/tethys/jackson/JacksonTokenWriterTest.scala b/modules/jackson-backend/src/test/scala/tethys/jackson/JacksonTokenWriterTest.scala index e8805401..f6ef2a14 100644 --- a/modules/jackson-backend/src/test/scala/tethys/jackson/JacksonTokenWriterTest.scala +++ b/modules/jackson-backend/src/test/scala/tethys/jackson/JacksonTokenWriterTest.scala @@ -72,7 +72,9 @@ class JacksonTokenWriterTest extends AnyFlatSpec with Matchers { } it should "write raw json" in { - iterate(_.writeRawJson("""{"some" : "raw json"}""")) shouldBe """{"some" : "raw json"}""" + iterate( + _.writeRawJson("""{"some" : "raw json"}""") + ) shouldBe """{"some" : "raw json"}""" } it should "write complex object structure" in { diff --git a/modules/jackson-backend/src/test/scala/tethys/jackson/RawJsonTest.scala b/modules/jackson-backend/src/test/scala/tethys/jackson/RawJsonTest.scala index 23e6c682..409ba23d 100644 --- a/modules/jackson-backend/src/test/scala/tethys/jackson/RawJsonTest.scala +++ b/modules/jackson-backend/src/test/scala/tethys/jackson/RawJsonTest.scala @@ -28,7 +28,9 @@ class RawJsonTest extends AnyFlatSpec with Matchers { "null".jsonAs[RawJson] shouldBe Right(RawJson("null")) } it should "read arrays" in { - "[1, 2, true,3.0,\"a\"]".jsonAs[RawJson] shouldBe Right(RawJson("[1,2,true,3.0,\"a\"]")) + "[1, 2, true,3.0,\"a\"]".jsonAs[RawJson] shouldBe Right( + RawJson("[1,2,true,3.0,\"a\"]") + ) } it should "read objects" in { """ @@ -39,7 +41,9 @@ class RawJsonTest extends AnyFlatSpec with Matchers { "e": { "f": null }, "g": [1,2,3] } - """.jsonAs[RawJson] shouldBe Right(RawJson("""{"a":1,"b":false,"c":"d","e":{"f":null},"g":[1,2,3]}""")) + """.jsonAs[RawJson] shouldBe Right( + RawJson("""{"a":1,"b":false,"c":"d","e":{"f":null},"g":[1,2,3]}""") + ) } behavior of "RawJson.writer" @@ -56,7 +60,8 @@ class RawJsonTest extends AnyFlatSpec with Matchers { } it should "write json as is in middle of object" in { case class Foo(a: Int, b: RawJson, c: Boolean) - implicit val fooWriter: JsonWriter[Foo] = JsonWriter.obj[Foo] + implicit val fooWriter: JsonWriter[Foo] = JsonWriter + .obj[Foo] .addField("a")(_.a) .addField("b")(_.b) .addField("c")(_.c) @@ -84,7 +89,10 @@ class RawJsonTest extends AnyFlatSpec with Matchers { tokenWriter.writeArrayStart() JsonWriter.intWriter.write(value(0).asInstanceOf[Int], tokenWriter) RawJson.rawJsonWriter.write(value(1).asInstanceOf[RawJson], tokenWriter) - JsonWriter.booleanWriter.write(value(2).asInstanceOf[Boolean], tokenWriter) + JsonWriter.booleanWriter.write( + value(2).asInstanceOf[Boolean], + tokenWriter + ) tokenWriter.writeArrayEnd() } } diff --git a/modules/json4s/src/main/scala/tethys/json4s/ast/Json4sSupport.scala b/modules/json4s/src/main/scala/tethys/json4s/ast/Json4sSupport.scala index e230e414..c91fb1fe 100644 --- a/modules/json4s/src/main/scala/tethys/json4s/ast/Json4sSupport.scala +++ b/modules/json4s/src/main/scala/tethys/json4s/ast/Json4sSupport.scala @@ -9,96 +9,145 @@ import tethys.writers.tokens.TokenWriter trait Json4sSupport { - implicit lazy val json4sJNothingWriter: JsonWriter[JNothing.type] = new JsonWriter[JsonAST.JNothing.type] { - override def write(name: String, value: JsonAST.JNothing.type, tokenWriter: TokenWriter): Unit = () - override def write(value: JsonAST.JNothing.type, tokenWriter: TokenWriter): Unit = () - } - implicit lazy val json4sJNullWriter: JsonWriter[JNull.type] = new JsonWriter[JsonAST.JNull.type] { - override def write(value: JsonAST.JNull.type, tokenWriter: TokenWriter): Unit = tokenWriter.writeNull() - } - implicit lazy val json4sJStringWriter: JsonWriter[JString] = JsonWriter[String].contramap(_.s) - implicit lazy val json4sJDoubleWriter: JsonWriter[JDouble] = JsonWriter[Double].contramap(_.num) - implicit lazy val json4sJDecimalWriter: JsonWriter[JDecimal] = JsonWriter[BigDecimal].contramap(_.num) - implicit lazy val json4sJLongWriter: JsonWriter[JLong] = JsonWriter[Long].contramap(_.num) - implicit lazy val json4sJIntWriter: JsonWriter[JInt] = JsonWriter[BigInt].contramap(_.num) - implicit lazy val json4sJBoolWriter: JsonWriter[JBool] = JsonWriter[Boolean].contramap(_.value) - implicit lazy val json4sJObjectWriter: JsonWriter[JObject] = new JsonObjectWriter[JObject] { - override def writeValues(value: JObject, tokenWriter: TokenWriter): Unit = value.obj.foreach { t => - json4sJValueWriter.write(t._1, t._2, tokenWriter) + implicit lazy val json4sJNothingWriter: JsonWriter[JNothing.type] = + new JsonWriter[JsonAST.JNothing.type] { + override def write( + name: String, + value: JsonAST.JNothing.type, + tokenWriter: TokenWriter + ): Unit = () + override def write( + value: JsonAST.JNothing.type, + tokenWriter: TokenWriter + ): Unit = () } - } - implicit lazy val json4sJArrayWriter: JsonWriter[JArray] = JsonWriter[List[JValue]].contramap(_.arr) - implicit lazy val json4sJSetWriter: JsonWriter[JSet] = JsonWriter[Set[JValue]].contramap(_.set) + implicit lazy val json4sJNullWriter: JsonWriter[JNull.type] = + new JsonWriter[JsonAST.JNull.type] { + override def write( + value: JsonAST.JNull.type, + tokenWriter: TokenWriter + ): Unit = tokenWriter.writeNull() + } + implicit lazy val json4sJStringWriter: JsonWriter[JString] = + JsonWriter[String].contramap(_.s) + implicit lazy val json4sJDoubleWriter: JsonWriter[JDouble] = + JsonWriter[Double].contramap(_.num) + implicit lazy val json4sJDecimalWriter: JsonWriter[JDecimal] = + JsonWriter[BigDecimal].contramap(_.num) + implicit lazy val json4sJLongWriter: JsonWriter[JLong] = + JsonWriter[Long].contramap(_.num) + implicit lazy val json4sJIntWriter: JsonWriter[JInt] = + JsonWriter[BigInt].contramap(_.num) + implicit lazy val json4sJBoolWriter: JsonWriter[JBool] = + JsonWriter[Boolean].contramap(_.value) + implicit lazy val json4sJObjectWriter: JsonWriter[JObject] = + new JsonObjectWriter[JObject] { + override def writeValues(value: JObject, tokenWriter: TokenWriter): Unit = + value.obj.foreach { t => + json4sJValueWriter.write(t._1, t._2, tokenWriter) + } + } + implicit lazy val json4sJArrayWriter: JsonWriter[JArray] = + JsonWriter[List[JValue]].contramap(_.arr) + implicit lazy val json4sJSetWriter: JsonWriter[JSet] = + JsonWriter[Set[JValue]].contramap(_.set) - implicit lazy val json4sJValueWriter: JsonWriter[JValue] = new JsonWriter[JValue] { - override def write(value: JValue, tokenWriter: TokenWriter): Unit = value match { - case JNothing => JsonWriter[JNothing.type].write(JNothing, tokenWriter) - case JNull => JsonWriter[JNull.type].write(JNull, tokenWriter) - case x: JString => JsonWriter[JString].write(x, tokenWriter) - case x: JDouble => JsonWriter[JDouble].write(x, tokenWriter) - case x: JDecimal => JsonWriter[JDecimal].write(x, tokenWriter) - case x: JLong => JsonWriter[JLong].write(x, tokenWriter) - case x: JInt => JsonWriter[JInt].write(x, tokenWriter) - case x: JBool => JsonWriter[JBool].write(x, tokenWriter) - case x: JObject => JsonWriter[JObject].write(x, tokenWriter) - case x: JArray => JsonWriter[JArray].write(x, tokenWriter) - case x: JSet => JsonWriter[JSet].write(x, tokenWriter) + implicit lazy val json4sJValueWriter: JsonWriter[JValue] = + new JsonWriter[JValue] { + override def write(value: JValue, tokenWriter: TokenWriter): Unit = + value match { + case JNothing => + JsonWriter[JNothing.type].write(JNothing, tokenWriter) + case JNull => JsonWriter[JNull.type].write(JNull, tokenWriter) + case x: JString => JsonWriter[JString].write(x, tokenWriter) + case x: JDouble => JsonWriter[JDouble].write(x, tokenWriter) + case x: JDecimal => JsonWriter[JDecimal].write(x, tokenWriter) + case x: JLong => JsonWriter[JLong].write(x, tokenWriter) + case x: JInt => JsonWriter[JInt].write(x, tokenWriter) + case x: JBool => JsonWriter[JBool].write(x, tokenWriter) + case x: JObject => JsonWriter[JObject].write(x, tokenWriter) + case x: JArray => JsonWriter[JArray].write(x, tokenWriter) + case x: JSet => JsonWriter[JSet].write(x, tokenWriter) + } } - } - implicit lazy val json4sJStringReader: JsonReader[JString] = JsonReader[String].map(JString(_)) - implicit lazy val json4sJDoubleReader: JsonReader[JDouble] = JsonReader[Double].map(JDouble(_)) - implicit lazy val json4sJDecimalReader: JsonReader[JDecimal] = JsonReader[BigDecimal].map(JDecimal(_)) - implicit lazy val json4sJLongReader: JsonReader[JLong] = JsonReader[Long].map(JLong(_)) - implicit lazy val json4sJIntReader: JsonReader[JInt] = JsonReader[BigInt].map(JInt(_)) - implicit lazy val json4sJBoolReader: JsonReader[JBool] = JsonReader[Boolean].map(b => if(b) JBool.True else JBool.False) - implicit lazy val json4sJObjectReader: JsonReader[JObject] = new JsonReader[JObject] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): JObject = { - if (!it.currentToken().isObjectStart) ReaderError.wrongJson(s"Expected object start but found: ${it.currentToken()}") - else { - it.next() - val builder = List.newBuilder[(String, JValue)] - while(!it.currentToken().isObjectEnd) { - val token = it.currentToken() - if(token.isFieldName) { - val name = it.fieldName() - val value = json4sJValueReader.read(it.next())(fieldName.appendFieldName(name)) - builder += name -> value - } else { - ReaderError.wrongJson(s"Expect end of object or field name but '$token' found")(fieldName) + implicit lazy val json4sJStringReader: JsonReader[JString] = + JsonReader[String].map(JString(_)) + implicit lazy val json4sJDoubleReader: JsonReader[JDouble] = + JsonReader[Double].map(JDouble(_)) + implicit lazy val json4sJDecimalReader: JsonReader[JDecimal] = + JsonReader[BigDecimal].map(JDecimal(_)) + implicit lazy val json4sJLongReader: JsonReader[JLong] = + JsonReader[Long].map(JLong(_)) + implicit lazy val json4sJIntReader: JsonReader[JInt] = + JsonReader[BigInt].map(JInt(_)) + implicit lazy val json4sJBoolReader: JsonReader[JBool] = + JsonReader[Boolean].map(b => if (b) JBool.True else JBool.False) + implicit lazy val json4sJObjectReader: JsonReader[JObject] = + new JsonReader[JObject] { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): JObject = { + if (!it.currentToken().isObjectStart) + ReaderError.wrongJson( + s"Expected object start but found: ${it.currentToken()}" + ) + else { + it.next() + val builder = List.newBuilder[(String, JValue)] + while (!it.currentToken().isObjectEnd) { + val token = it.currentToken() + if (token.isFieldName) { + val name = it.fieldName() + val value = json4sJValueReader.read(it.next())( + fieldName.appendFieldName(name) + ) + builder += name -> value + } else { + ReaderError.wrongJson( + s"Expect end of object or field name but '$token' found" + )(fieldName) + } } + it.next() + JObject(builder.result()) } - it.next() - JObject(builder.result()) } } - } - implicit lazy val json4sJArrayReader: JsonReader[JArray] = JsonReader[List[JValue]].map(JArray(_)) - implicit lazy val json4sJSetReader: JsonReader[JSet] = JsonReader[Set[JValue]].map(JSet(_)) + implicit lazy val json4sJArrayReader: JsonReader[JArray] = + JsonReader[List[JValue]].map(JArray(_)) + implicit lazy val json4sJSetReader: JsonReader[JSet] = + JsonReader[Set[JValue]].map(JSet(_)) - implicit lazy val json4sJValueReader: JsonReader[JValue] = new JsonReader[JValue] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): JValue = { - val token = it.currentToken() - if(token.isObjectStart) JsonReader[JObject].read(it) - else if (token.isArrayStart) JsonReader[JArray].read(it) - else if (token.isStringValue) JsonReader[JString].read(it) - else if (token.isBooleanValue) JsonReader[JBool].read(it) - else if (token.isNumberValue) JsonReader[Number].read(it) match { - case x@(_: java.lang.Short | _: java.lang.Integer | _: java.lang.Long) => JLong(x.longValue()) - case x@(_: java.lang.Float | _: java.lang.Double) => JDouble(x.doubleValue()) + implicit lazy val json4sJValueReader: JsonReader[JValue] = + new JsonReader[JValue] { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): JValue = { + val token = it.currentToken() + if (token.isObjectStart) JsonReader[JObject].read(it) + else if (token.isArrayStart) JsonReader[JArray].read(it) + else if (token.isStringValue) JsonReader[JString].read(it) + else if (token.isBooleanValue) JsonReader[JBool].read(it) + else if (token.isNumberValue) JsonReader[Number].read(it) match { + case x @ (_: java.lang.Short | _: java.lang.Integer | + _: java.lang.Long) => + JLong(x.longValue()) + case x @ (_: java.lang.Float | _: java.lang.Double) => + JDouble(x.doubleValue()) - case x: java.math.BigInteger => JInt(x) - case x: BigInt => JInt(x) + case x: java.math.BigInteger => JInt(x) + case x: BigInt => JInt(x) - case x: java.math.BigDecimal=> JDecimal(x) - case x: BigDecimal => JDecimal(x) - case x => JDecimal(x.doubleValue()) - } - else if (token.isNullValue) { - it.next() - JNull + case x: java.math.BigDecimal => JDecimal(x) + case x: BigDecimal => JDecimal(x) + case x => JDecimal(x.doubleValue()) + } + else if (token.isNullValue) { + it.next() + JNull + } else + ReaderError.wrongJson(s"Unexpected token found: $token")(fieldName) } - else ReaderError.wrongJson(s"Unexpected token found: $token")(fieldName) } - } } diff --git a/modules/json4s/src/test/scala/tethys/json4s/Json4sSupportTest.scala b/modules/json4s/src/test/scala/tethys/json4s/Json4sSupportTest.scala index 8d80e984..459c059b 100644 --- a/modules/json4s/src/test/scala/tethys/json4s/Json4sSupportTest.scala +++ b/modules/json4s/src/test/scala/tethys/json4s/Json4sSupportTest.scala @@ -18,11 +18,11 @@ class Json4sSupportTest extends AnyFlatSpec with Matchers { } it should "parse JDouble" in { - token(100.0D).tokensAs[JDouble] shouldBe JDouble(100.0D) + token(100.0d).tokensAs[JDouble] shouldBe JDouble(100.0d) } it should "parse JDecimal" in { - token(100.0D).tokensAs[JDecimal] shouldBe JDecimal(100.0D) + token(100.0d).tokensAs[JDecimal] shouldBe JDecimal(100.0d) } it should "parse JString" in { @@ -38,19 +38,26 @@ class Json4sSupportTest extends AnyFlatSpec with Matchers { } it should "parse JArray" in { - arr(1, 2L, 3).tokensAs[JArray] shouldBe JArray(List(JLong(1), JLong(2), JLong(3))) + arr(1, 2L, 3).tokensAs[JArray] shouldBe JArray( + List(JLong(1), JLong(2), JLong(3)) + ) } it should "parse JArray of JObject" in { - arr(obj("a" -> "b", "c" -> "d")).tokensAs[JValue] shouldBe JArray(List(JObject("a" -> JString("b"), "c" -> JString("d")))) + arr(obj("a" -> "b", "c" -> "d")).tokensAs[JValue] shouldBe JArray( + List(JObject("a" -> JString("b"), "c" -> JString("d"))) + ) } it should "parse JSet" in { - arr(1, 2L, 3).tokensAs[JSet] shouldBe JSet(Set(JLong(1), JLong(2), JLong(3))) + arr(1, 2L, 3).tokensAs[JSet] shouldBe JSet( + Set(JLong(1), JLong(2), JLong(3)) + ) } it should "parse JObject" in { - obj("a" -> arr(1), "b" -> obj("c" -> null)).tokensAs[JObject] shouldBe JObject( + obj("a" -> arr(1), "b" -> obj("c" -> null)) + .tokensAs[JObject] shouldBe JObject( "a" -> JArray(List(JLong(1L))), "b" -> JObject("c" -> JNull) ) @@ -66,11 +73,11 @@ class Json4sSupportTest extends AnyFlatSpec with Matchers { } it should "write JDouble" in { - JDouble(100.0D).asTokenList shouldBe token(100.0D) + JDouble(100.0d).asTokenList shouldBe token(100.0d) } it should "write JDecimal" in { - JDecimal(100.0D).asTokenList shouldBe token(BigDecimal(100.0D)) + JDecimal(100.0d).asTokenList shouldBe token(BigDecimal(100.0d)) } it should "write JString" in { @@ -86,7 +93,11 @@ class Json4sSupportTest extends AnyFlatSpec with Matchers { } it should "write JArray" in { - JArray(List(JLong(1), JLong(2), JLong(3))).asTokenList shouldBe arr(1L, 2L, 3L) + JArray(List(JLong(1), JLong(2), JLong(3))).asTokenList shouldBe arr( + 1L, + 2L, + 3L + ) } it should "write JSet" in { diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/AutoDerivation.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/AutoDerivation.scala index cc1b897e..0db98889 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/AutoDerivation.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/AutoDerivation.scala @@ -7,6 +7,10 @@ import tethys.{JsonObjectWriter, JsonReader} import scala.language.experimental.macros trait AutoDerivation { - implicit def jsonWriterMaterializer[A]: LowPriorityInstance[JsonObjectWriter[A]] = macro AutoDerivationMacro.jsonWriter[A] - implicit def jsonReaderMaterializer[A]: LowPriorityInstance[JsonReader[A]] = macro AutoDerivationMacro.jsonReader[A] + implicit def jsonWriterMaterializer[A] + : LowPriorityInstance[JsonObjectWriter[A]] = macro + AutoDerivationMacro.jsonWriter[A] + implicit def jsonReaderMaterializer[A] + : LowPriorityInstance[JsonReader[A]] = macro + AutoDerivationMacro.jsonReader[A] } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/SemiautoDerivation.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/SemiautoDerivation.scala index 8ae4cbf9..e1ef5343 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/SemiautoDerivation.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/SemiautoDerivation.scala @@ -1,7 +1,10 @@ package tethys.derivation import tethys.derivation.builder._ -import tethys.derivation.impl.builder.{ReaderDescriptionMacro, WriterDescriptorMacro} +import tethys.derivation.impl.builder.{ + ReaderDescriptionMacro, + WriterDescriptorMacro +} import tethys.derivation.impl.derivation.SemiautoDerivationMacro import tethys.{JsonObjectWriter, JsonReader} @@ -9,19 +12,29 @@ import scala.annotation.compileTimeOnly import scala.language.experimental.macros trait SemiautoDerivation { - def jsonWriter[A]: JsonObjectWriter[A] = macro SemiautoDerivationMacro.simpleJsonWriter[A] - def jsonWriter[A](description: WriterDescription[A]): JsonObjectWriter[A] = macro SemiautoDerivationMacro.describedJsonWriter[A] - def jsonWriter[A](builder: WriterBuilder[A]): JsonObjectWriter[A] = macro SemiautoDerivationMacro.jsonWriterWithBuilder[A] - def jsonWriter[A](config: WriterDerivationConfig): JsonObjectWriter[A] = macro SemiautoDerivationMacro.jsonWriterWithConfig[A] - - def describe[A](builder: WriterBuilder[A]): WriterDescription[A] = macro WriterDescriptorMacro.simpleDescription[A] - - def jsonReader[A]: JsonReader[A] = macro SemiautoDerivationMacro.simpleJsonReader[A] - def jsonReader[A](description: ReaderDescription[A]): JsonReader[A] = macro SemiautoDerivationMacro.describedJsonReader[A] - def jsonReader[A](builder: ReaderBuilder[A]): JsonReader[A] = macro SemiautoDerivationMacro.jsonReaderWithBuilder[A] - def jsonReader[A](config: ReaderDerivationConfig): JsonReader[A] = macro SemiautoDerivationMacro.jsonReaderWithConfig[A] - - def describe[A](builder: ReaderBuilder[A]): ReaderDescription[A] = macro ReaderDescriptionMacro.readerDescription[A] + def jsonWriter[A]: JsonObjectWriter[A] = macro + SemiautoDerivationMacro.simpleJsonWriter[A] + def jsonWriter[A](description: WriterDescription[A]): JsonObjectWriter[A] = macro + SemiautoDerivationMacro.describedJsonWriter[A] + def jsonWriter[A](builder: WriterBuilder[A]): JsonObjectWriter[A] = macro + SemiautoDerivationMacro.jsonWriterWithBuilder[A] + def jsonWriter[A](config: WriterDerivationConfig): JsonObjectWriter[A] = macro + SemiautoDerivationMacro.jsonWriterWithConfig[A] + + def describe[A](builder: WriterBuilder[A]): WriterDescription[A] = macro + WriterDescriptorMacro.simpleDescription[A] + + def jsonReader[A]: JsonReader[A] = macro + SemiautoDerivationMacro.simpleJsonReader[A] + def jsonReader[A](description: ReaderDescription[A]): JsonReader[A] = macro + SemiautoDerivationMacro.describedJsonReader[A] + def jsonReader[A](builder: ReaderBuilder[A]): JsonReader[A] = macro + SemiautoDerivationMacro.jsonReaderWithBuilder[A] + def jsonReader[A](config: ReaderDerivationConfig): JsonReader[A] = macro + SemiautoDerivationMacro.jsonReaderWithConfig[A] + + def describe[A](builder: ReaderBuilder[A]): ReaderDescription[A] = macro + ReaderDescriptionMacro.readerDescription[A] implicit class ReaderFieldStringOps(val s: String) { diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/DependentField.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/DependentField.scala index e02f6707..1a89b04e 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/DependentField.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/DependentField.scala @@ -9,729 +9,14533 @@ sealed trait DependentField0[A, B] { def from[T1](f1: (A) => T1): DependentField1[A, B, T1] def from[T1, T2](f1: (A) => T1, f2: (A) => T2): DependentField2[A, B, T1, T2] - def from[T1, T2, T3](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3): DependentField3[A, B, T1, T2, T3] - def from[T1, T2, T3, T4](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4): DependentField4[A, B, T1, T2, T3, T4] - def from[T1, T2, T3, T4, T5](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5[A, B, T1, T2, T3, T4, T5] - def from[T1, T2, T3, T4, T5, T6](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6[A, B, T1, T2, T3, T4, T5, T6] - def from[T1, T2, T3, T4, T5, T6, T7](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - def from[T1, T2, T3, T4, T5, T6, T7, T8](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def from[T1, T2, T3]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3 + ): DependentField3[A, B, T1, T2, T3] + def from[T1, T2, T3, T4]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4 + ): DependentField4[A, B, T1, T2, T3, T4] + def from[T1, T2, T3, T4, T5]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5 + ): DependentField5[A, B, T1, T2, T3, T4, T5] + def from[T1, T2, T3, T4, T5, T6]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6[A, B, T1, T2, T3, T4, T5, T6] + def from[T1, T2, T3, T4, T5, T6, T7]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] + def from[T1, T2, T3, T4, T5, T6, T7, T8]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def from[T1](f1: ReaderField[T1]): DependentField1[A, B, T1] - def from[T1, T2](f1: ReaderField[T1], f2: ReaderField[T2]): DependentField2[A, B, T1, T2] - def from[T1, T2, T3](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3]): DependentField3[A, B, T1, T2, T3] - def from[T1, T2, T3, T4](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4[A, B, T1, T2, T3, T4] - def from[T1, T2, T3, T4, T5](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5[A, B, T1, T2, T3, T4, T5] - def from[T1, T2, T3, T4, T5, T6](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6[A, B, T1, T2, T3, T4, T5, T6] - def from[T1, T2, T3, T4, T5, T6, T7](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - def from[T1, T2, T3, T4, T5, T6, T7, T8](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def from[T1, T2]( + f1: ReaderField[T1], + f2: ReaderField[T2] + ): DependentField2[A, B, T1, T2] + def from[T1, T2, T3]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3] + ): DependentField3[A, B, T1, T2, T3] + def from[T1, T2, T3, T4]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4] + ): DependentField4[A, B, T1, T2, T3, T4] + def from[T1, T2, T3, T4, T5]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5] + ): DependentField5[A, B, T1, T2, T3, T4, T5] + def from[T1, T2, T3, T4, T5, T6]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6[A, B, T1, T2, T3, T4, T5, T6] + def from[T1, T2, T3, T4, T5, T6, T7]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] + def from[T1, T2, T3, T4, T5, T6, T7, T8]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField1F[A, B, T1] { def apply(fun: (T1) => B): ReaderBuilder[A] } -sealed trait DependentField1[A, B, T1] - extends DependentField1F[A, B, T1] { +sealed trait DependentField1[A, B, T1] extends DependentField1F[A, B, T1] { def and[T2](f2: (A) => T2): DependentField2F[A, B, T1, T2] - def and[T2, T3](f2: (A) => T2, f3: (A) => T3): DependentField3F[A, B, T1, T2, T3] - def and[T2, T3, T4](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T2, T3, T4, T5](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T2, T3, T4, T5, T6](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T2, T3, T4, T5, T6, T7](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T2, T3, T4, T5, T6, T7, T8](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T2, T3, T4, T5, T6, T7, T8, T9](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T2, T3]( + f2: (A) => T2, + f3: (A) => T3 + ): DependentField3F[A, B, T1, T2, T3] + def and[T2, T3, T4]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4 + ): DependentField4F[A, B, T1, T2, T3, T4] + def and[T2, T3, T4, T5]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5 + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T2, T3, T4, T5, T6]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T2, T3, T4, T5, T6, T7]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T2, T3, T4, T5, T6, T7, T8]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T2, T3, T4, T5, T6, T7, T8, T9]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def and[T2](f2: ReaderField[T2]): DependentField2F[A, B, T1, T2] - def and[T2, T3](f2: ReaderField[T2], f3: ReaderField[T3]): DependentField3F[A, B, T1, T2, T3] - def and[T2, T3, T4](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T2, T3, T4, T5](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T2, T3, T4, T5, T6](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T2, T3, T4, T5, T6, T7](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T2, T3, T4, T5, T6, T7, T8](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T2, T3, T4, T5, T6, T7, T8, T9](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T2, T3]( + f2: ReaderField[T2], + f3: ReaderField[T3] + ): DependentField3F[A, B, T1, T2, T3] + def and[T2, T3, T4]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4] + ): DependentField4F[A, B, T1, T2, T3, T4] + def and[T2, T3, T4, T5]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5] + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T2, T3, T4, T5, T6]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T2, T3, T4, T5, T6, T7]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T2, T3, T4, T5, T6, T7, T8]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T2, T3, T4, T5, T6, T7, T8, T9]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField2F[A, B, T1, T2] { def apply(fun: (T1, T2) => B): ReaderBuilder[A] } sealed trait DependentField2[A, B, T1, T2] - extends DependentField2F[A, B, T1, T2] { + extends DependentField2F[A, B, T1, T2] { def and[T3](f3: (A) => T3): DependentField3F[A, B, T1, T2, T3] - def and[T3, T4](f3: (A) => T3, f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T3, T4, T5](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T3, T4, T5, T6](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T3, T4, T5, T6, T7](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T3, T4, T5, T6, T7, T8](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T3, T4, T5, T6, T7, T8, T9](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T3, T4, T5, T6, T7, T8, T9, T10](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T3, T4]( + f3: (A) => T3, + f4: (A) => T4 + ): DependentField4F[A, B, T1, T2, T3, T4] + def and[T3, T4, T5]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5 + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T3, T4, T5, T6]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T3, T4, T5, T6, T7]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T3, T4, T5, T6, T7, T8]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T3, T4, T5, T6, T7, T8, T9]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T3, T4, T5, T6, T7, T8, T9, T10]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def and[T3](f3: ReaderField[T3]): DependentField3F[A, B, T1, T2, T3] - def and[T3, T4](f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T3, T4, T5](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T3, T4, T5, T6](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T3, T4, T5, T6, T7](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T3, T4, T5, T6, T7, T8](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T3, T4, T5, T6, T7, T8, T9](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T3, T4, T5, T6, T7, T8, T9, T10](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T3, T4]( + f3: ReaderField[T3], + f4: ReaderField[T4] + ): DependentField4F[A, B, T1, T2, T3, T4] + def and[T3, T4, T5]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5] + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T3, T4, T5, T6]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T3, T4, T5, T6, T7]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T3, T4, T5, T6, T7, T8]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T3, T4, T5, T6, T7, T8, T9]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T3, T4, T5, T6, T7, T8, T9, T10]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField3F[A, B, T1, T2, T3] { def apply(fun: (T1, T2, T3) => B): ReaderBuilder[A] } sealed trait DependentField3[A, B, T1, T2, T3] - extends DependentField3F[A, B, T1, T2, T3] { + extends DependentField3F[A, B, T1, T2, T3] { def and[T4](f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T4, T5](f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T4, T5, T6](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T4, T5, T6, T7](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T4, T5, T6, T7, T8](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T4, T5, T6, T7, T8, T9](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T4, T5, T6, T7, T8, T9, T10](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T4, T5, T6, T7, T8, T9, T10, T11](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T4, T5]( + f4: (A) => T4, + f5: (A) => T5 + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T4, T5, T6]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T4, T5, T6, T7]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T4, T5, T6, T7, T8]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T4, T5, T6, T7, T8, T9]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T4, T5, T6, T7, T8, T9, T10]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T4, T5, T6, T7, T8, T9, T10, T11]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def and[T4](f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T4, T5](f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T4, T5, T6](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T4, T5, T6, T7](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T4, T5, T6, T7, T8](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T4, T5, T6, T7, T8, T9](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T4, T5, T6, T7, T8, T9, T10](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T4, T5, T6, T7, T8, T9, T10, T11](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T4, T5]( + f4: ReaderField[T4], + f5: ReaderField[T5] + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T4, T5, T6]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T4, T5, T6, T7]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T4, T5, T6, T7, T8]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T4, T5, T6, T7, T8, T9]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T4, T5, T6, T7, T8, T9, T10]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T4, T5, T6, T7, T8, T9, T10, T11]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField4F[A, B, T1, T2, T3, T4] { def apply(fun: (T1, T2, T3, T4) => B): ReaderBuilder[A] } sealed trait DependentField4[A, B, T1, T2, T3, T4] - extends DependentField4F[A, B, T1, T2, T3, T4] { + extends DependentField4F[A, B, T1, T2, T3, T4] { def and[T5](f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T5, T6](f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T5, T6, T7](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T5, T6, T7, T8](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T5, T6, T7, T8, T9](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T5, T6, T7, T8, T9, T10](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T5, T6, T7, T8, T9, T10, T11](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T5, T6, T7, T8, T9, T10, T11, T12](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T5, T6]( + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T5, T6, T7]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T5, T6, T7, T8]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T5, T6, T7, T8, T9]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T5, T6, T7, T8, T9, T10]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T5, T6, T7, T8, T9, T10, T11]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T5, T6, T7, T8, T9, T10, T11, T12]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def and[T5](f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T5, T6](f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T5, T6, T7](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T5, T6, T7, T8](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T5, T6, T7, T8, T9](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T5, T6, T7, T8, T9, T10](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T5, T6, T7, T8, T9, T10, T11](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T5, T6, T7, T8, T9, T10, T11, T12](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T5, T6]( + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T5, T6, T7]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T5, T6, T7, T8]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T5, T6, T7, T8, T9]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T5, T6, T7, T8, T9, T10]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T5, T6, T7, T8, T9, T10, T11]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T5, T6, T7, T8, T9, T10, T11, T12]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField5F[A, B, T1, T2, T3, T4, T5] { def apply(fun: (T1, T2, T3, T4, T5) => B): ReaderBuilder[A] } sealed trait DependentField5[A, B, T1, T2, T3, T4, T5] - extends DependentField5F[A, B, T1, T2, T3, T4, T5] { + extends DependentField5F[A, B, T1, T2, T3, T4, T5] { def and[T6](f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T6, T7](f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T6, T7, T8](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T6, T7, T8, T9](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T6, T7, T8, T9, T10](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T6, T7, T8, T9, T10, T11](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T6, T7, T8, T9, T10, T11, T12](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T6, T7, T8, T9, T10, T11, T12, T13](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T6](f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T6, T7](f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T6, T7, T8](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T6, T7, T8, T9](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T6, T7, T8, T9, T10](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T6, T7, T8, T9, T10, T11](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T6, T7, T8, T9, T10, T11, T12](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T6, T7, T8, T9, T10, T11, T12, T13](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + def and[T6, T7]( + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T6, T7, T8]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T6, T7, T8, T9]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T6, T7, T8, T9, T10]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T6, T7, T8, T9, T10, T11]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T6, T7, T8, T9, T10, T11, T12]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T6, T7, T8, T9, T10, T11, T12, T13]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T6]( + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T6, T7]( + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T6, T7, T8]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T6, T7, T8, T9]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T6, T7, T8, T9, T10]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T6, T7, T8, T9, T10, T11]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T6, T7, T8, T9, T10, T11, T12]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T6, T7, T8, T9, T10, T11, T12, T13]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField6F[A, B, T1, T2, T3, T4, T5, T6] { def apply(fun: (T1, T2, T3, T4, T5, T6) => B): ReaderBuilder[A] } sealed trait DependentField6[A, B, T1, T2, T3, T4, T5, T6] - extends DependentField6F[A, B, T1, T2, T3, T4, T5, T6] { + extends DependentField6F[A, B, T1, T2, T3, T4, T5, T6] { def and[T7](f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T7, T8](f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T7, T8, T9](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T7, T8, T9, T10](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T7, T8, T9, T10, T11](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T7, T8, T9, T10, T11, T12](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T7, T8, T9, T10, T11, T12, T13](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T7, T8, T9, T10, T11, T12, T13, T14](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T7](f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T7, T8](f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T7, T8, T9](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T7, T8, T9, T10](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T7, T8, T9, T10, T11](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T7, T8, T9, T10, T11, T12](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T7, T8, T9, T10, T11, T12, T13](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T7, T8, T9, T10, T11, T12, T13, T14](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + def and[T7, T8]( + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T7, T8, T9]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T7, T8, T9, T10]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T7, T8, T9, T10, T11]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T7, T8, T9, T10, T11, T12]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T7, T8, T9, T10, T11, T12, T13]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T7]( + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T7, T8]( + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T7, T8, T9]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T7, T8, T9, T10]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T7, T8, T9, T10, T11]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T7, T8, T9, T10, T11, T12]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T7, T8, T9, T10, T11, T12, T13]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] { def apply(fun: (T1, T2, T3, T4, T5, T6, T7) => B): ReaderBuilder[A] } sealed trait DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - extends DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] { - def and[T8](f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T8, T9](f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T8, T9, T10](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T8, T9, T10, T11](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T8, T9, T10, T11, T12](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T8, T9, T10, T11, T12, T13](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T8, T9, T10, T11, T12, T13, T14](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T8, T9, T10, T11, T12, T13, T14, T15](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T8](f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T8, T9](f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T8, T9, T10](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T8, T9, T10, T11](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T8, T9, T10, T11, T12](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T8, T9, T10, T11, T12, T13](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T8, T9, T10, T11, T12, T13, T14](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T8, T9, T10, T11, T12, T13, T14, T15](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + extends DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] { + def and[T8]( + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T8, T9]( + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T8, T9, T10]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T8, T9, T10, T11]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T8, T9, T10, T11, T12]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T8, T9, T10, T11, T12, T13]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T8, T9, T10, T11, T12, T13, T14]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T8]( + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T8, T9]( + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T8, T9, T10]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T8, T9, T10, T11]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T8, T9, T10, T11, T12]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T8, T9, T10, T11, T12, T13]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T8, T9, T10, T11, T12, T13, T14]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] { def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8) => B): ReaderBuilder[A] } sealed trait DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - extends DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] { - def and[T9](f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T9, T10](f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T9, T10, T11](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T9, T10, T11, T12](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T9, T10, T11, T12, T13](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T9, T10, T11, T12, T13, T14](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T9, T10, T11, T12, T13, T14, T15](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T9, T10, T11, T12, T13, T14, T15, T16](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T9](f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T9, T10](f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T9, T10, T11](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T9, T10, T11, T12](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T9, T10, T11, T12, T13](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T9, T10, T11, T12, T13, T14](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T9, T10, T11, T12, T13, T14, T15](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T9, T10, T11, T12, T13, T14, T15, T16](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + extends DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] { + def and[T9]( + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T9, T10]( + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T9, T10, T11]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T9, T10, T11, T12]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T9, T10, T11, T12, T13]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T9, T10, T11, T12, T13, T14]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T9, T10, T11, T12, T13, T14, T15]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T9]( + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T9, T10]( + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T9, T10, T11]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T9, T10, T11, T12]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T9, T10, T11, T12, T13]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T9, T10, T11, T12, T13, T14]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T9, T10, T11, T12, T13, T14, T15]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] { def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9) => B): ReaderBuilder[A] } sealed trait DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - extends DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] { - def and[T10](f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T10, T11](f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T10, T11, T12](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T10, T11, T12, T13](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T10, T11, T12, T13, T14](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T10, T11, T12, T13, T14, T15](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T10, T11, T12, T13, T14, T15, T16](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T10, T11, T12, T13, T14, T15, T16, T17](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T10](f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T10, T11](f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T10, T11, T12](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T10, T11, T12, T13](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T10, T11, T12, T13, T14](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T10, T11, T12, T13, T14, T15](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T10, T11, T12, T13, T14, T15, T16](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T10, T11, T12, T13, T14, T15, T16, T17](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + extends DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] { + def and[T10]( + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T10, T11]( + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T10, T11, T12]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T10, T11, T12, T13]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T10, T11, T12, T13, T14]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T10, T11, T12, T13, T14, T15]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T10, T11, T12, T13, T14, T15, T16]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T10]( + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T10, T11]( + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T10, T11, T12]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T10, T11, T12, T13]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T10, T11, T12, T13, T14]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T10, T11, T12, T13, T14, T15]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T10, T11, T12, T13, T14, T15, T16]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) => B): ReaderBuilder[A] + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) => B + ): ReaderBuilder[A] } sealed trait DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - extends DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] { - def and[T11](f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T11, T12](f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T11, T12, T13](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T11, T12, T13, T14](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T11, T12, T13, T14, T15](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T11, T12, T13, T14, T15, T16](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T11, T12, T13, T14, T15, T16, T17](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T11, T12, T13, T14, T15, T16, T17, T18](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T11](f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T11, T12](f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T11, T12, T13](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T11, T12, T13, T14](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T11, T12, T13, T14, T15](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T11, T12, T13, T14, T15, T16](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T11, T12, T13, T14, T15, T16, T17](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T11, T12, T13, T14, T15, T16, T17, T18](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) => B): ReaderBuilder[A] -} - -sealed trait DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - extends DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] { - def and[T12](f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T12, T13](f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T12, T13, T14](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T12, T13, T14, T15](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T12, T13, T14, T15, T16](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T12, T13, T14, T15, T16, T17](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T12, T13, T14, T15, T16, T17, T18](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T12, T13, T14, T15, T16, T17, T18, T19](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T12](f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T12, T13](f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T12, T13, T14](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T12, T13, T14, T15](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T12, T13, T14, T15, T16](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T12, T13, T14, T15, T16, T17](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T12, T13, T14, T15, T16, T17, T18](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T12, T13, T14, T15, T16, T17, T18, T19](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) => B): ReaderBuilder[A] -} - -sealed trait DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - extends DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] { - def and[T13](f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T13, T14](f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T13, T14, T15](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T13, T14, T15, T16](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T13, T14, T15, T16, T17](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T13, T14, T15, T16, T17, T18](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T13, T14, T15, T16, T17, T18, T19](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T13, T14, T15, T16, T17, T18, T19, T20](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T13](f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T13, T14](f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T13, T14, T15](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T13, T14, T15, T16](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T13, T14, T15, T16, T17](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T13, T14, T15, T16, T17, T18](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T13, T14, T15, T16, T17, T18, T19](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T13, T14, T15, T16, T17, T18, T19, T20](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) => B): ReaderBuilder[A] -} - -sealed trait DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - extends DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] { - def and[T14](f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T14, T15](f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T14, T15, T16](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T14, T15, T16, T17](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T14, T15, T16, T17, T18](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T14, T15, T16, T17, T18, T19](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T14, T15, T16, T17, T18, T19, T20](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T14, T15, T16, T17, T18, T19, T20, T21](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T14, T15, T16, T17, T18, T19, T20, T21, T22](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T14](f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T14, T15](f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T14, T15, T16](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T14, T15, T16, T17](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T14, T15, T16, T17, T18](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T14, T15, T16, T17, T18, T19](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T14, T15, T16, T17, T18, T19, T20](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T14, T15, T16, T17, T18, T19, T20, T21](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T14, T15, T16, T17, T18, T19, T20, T21, T22](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) => B): ReaderBuilder[A] -} - -sealed trait DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - extends DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] { - def and[T15](f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T15, T16](f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T15, T16, T17](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T15, T16, T17, T18](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T15, T16, T17, T18, T19](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T15, T16, T17, T18, T19, T20](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T15, T16, T17, T18, T19, T20, T21](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T15, T16, T17, T18, T19, T20, T21, T22](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T15](f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T15, T16](f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T15, T16, T17](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T15, T16, T17, T18](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T15, T16, T17, T18, T19](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T15, T16, T17, T18, T19, T20](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T15, T16, T17, T18, T19, T20, T21](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T15, T16, T17, T18, T19, T20, T21, T22](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + extends DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] { + def and[T11]( + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T11, T12]( + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T11, T12, T13]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T11, T12, T13, T14]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T11, T12, T13, T14, T15]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T11, T12, T13, T14, T15, T16]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T11, T12, T13, T14, T15, T16, T17]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T11]( + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T11, T12]( + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T11, T12, T13]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T11, T12, T13, T14]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T11, T12, T13, T14, T15]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T11, T12, T13, T14, T15, T16]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T11, T12, T13, T14, T15, T16, T17]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} -sealed trait DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) => B): ReaderBuilder[A] +sealed trait DependentField11F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11 +] { + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) => B + ): ReaderBuilder[A] } -sealed trait DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - extends DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] { - def and[T16](f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T16, T17](f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T16, T17, T18](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T16, T17, T18, T19](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T16, T17, T18, T19, T20](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T16, T17, T18, T19, T20, T21](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T16, T17, T18, T19, T20, T21, T22](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField11[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11 +] extends DependentField11F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11 + ] { + def and[T12]( + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T12, T13](f12: (A) => T12, f13: (A) => T13): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T12, T13, T14]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T12, T13, T14, T15]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T12, T13, T14, T15, T16]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T12, T13, T14, T15, T16, T17]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T12, T13, T14, T15, T16, T17, T18]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] - def and[T16](f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T16, T17](f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T16, T17, T18](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T16, T17, T18, T19](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T16, T17, T18, T19, T20](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T16, T17, T18, T19, T20, T21](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T16, T17, T18, T19, T20, T21, T22](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T12]( + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T12, T13]( + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T12, T13, T14]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T12, T13, T14, T15]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T12, T13, T14, T15, T16]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T12, T13, T14, T15, T16, T17]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T12, T13, T14, T15, T16, T17, T18]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - -sealed trait DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) => B): ReaderBuilder[A] +sealed trait DependentField12F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12 +] { + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) => B + ): ReaderBuilder[A] } -sealed trait DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - extends DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] { - def and[T17](f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T17, T18](f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T17, T18, T19](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T17, T18, T19, T20](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T17, T18, T19, T20, T21](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T17, T18, T19, T20, T21, T22](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField12[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12 +] extends DependentField12F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12 + ] { + def and[T13](f13: (A) => T13): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T13, T14](f13: (A) => T13, f14: (A) => T14): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T13, T14, T15]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T13, T14, T15, T16]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T13, T14, T15, T16, T17]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T13, T14, T15, T16, T17, T18]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T13, T14, T15, T16, T17, T18, T19]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] - def and[T17](f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T17, T18](f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T17, T18, T19](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T17, T18, T19, T20](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T17, T18, T19, T20, T21](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T17, T18, T19, T20, T21, T22](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T13](f13: ReaderField[T13]): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T13, T14]( + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T13, T14, T15]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T13, T14, T15, T16]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T13, T14, T15, T16, T17]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T13, T14, T15, T16, T17, T18]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T13, T14, T15, T16, T17, T18, T19]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - -sealed trait DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) => B): ReaderBuilder[A] +sealed trait DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 +] { + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) => B + ): ReaderBuilder[A] } -sealed trait DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - extends DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] { - def and[T18](f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T18, T19](f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T18, T19, T20](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T18, T19, T20, T21](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T18, T19, T20, T21, T22](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField13[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 +] extends DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] { + def and[T14](f14: (A) => T14): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T14, T15](f14: (A) => T14, f15: (A) => T15): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T14, T15, T16]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T14, T15, T16, T17]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T14, T15, T16, T17, T18]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T14, T15, T16, T17, T18, T19]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T14, T15, T16, T17, T18, T19, T20]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T14, T15, T16, T17, T18, T19, T20, T21]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] - def and[T18](f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T18, T19](f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T18, T19, T20](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T18, T19, T20, T21](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T18, T19, T20, T21, T22](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T14](f14: ReaderField[T14]): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T14, T15]( + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T14, T15, T16]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T14, T15, T16, T17]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T14, T15, T16, T17, T18]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T14, T15, T16, T17, T18, T19]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T14, T15, T16, T17, T18, T19, T20]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T14, T15, T16, T17, T18, T19, T20, T21]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - -sealed trait DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) => B): ReaderBuilder[A] +sealed trait DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 +] { + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) => B + ): ReaderBuilder[A] } -sealed trait DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - extends DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] { - def and[T19](f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T19, T20](f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T19, T20, T21](f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T19, T20, T21, T22](f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField14[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 +] extends DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] { + def and[T15](f15: (A) => T15): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T15, T16](f15: (A) => T15, f16: (A) => T16): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T15, T16, T17]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T15, T16, T17, T18]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T15, T16, T17, T18, T19]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T15, T16, T17, T18, T19, T20]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T15, T16, T17, T18, T19, T20, T21]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T15, T16, T17, T18, T19, T20, T21, T22]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + + def and[T15](f15: ReaderField[T15]): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T15, T16]( + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T15, T16, T17]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T15, T16, T17, T18]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T15, T16, T17, T18, T19]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T15, T16, T17, T18, T19, T20]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T15, T16, T17, T18, T19, T20, T21]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T15, T16, T17, T18, T19, T20, T21, T22]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} - def and[T19](f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T19, T20](f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T19, T20, T21](f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T19, T20, T21, T22](f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField15[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 +] extends DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] { + def and[T16](f16: (A) => T16): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T16, T17](f16: (A) => T16, f17: (A) => T17): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T16, T17, T18]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T16, T17, T18, T19]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T16, T17, T18, T19, T20]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T16, T17, T18, T19, T20, T21]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T16, T17, T18, T19, T20, T21, T22]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] -sealed trait DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) => B): ReaderBuilder[A] + def and[T16](f16: ReaderField[T16]): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T16, T17]( + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T16, T17, T18]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T16, T17, T18, T19]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T16, T17, T18, T19, T20]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T16, T17, T18, T19, T20, T21]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T16, T17, T18, T19, T20, T21, T22]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } -sealed trait DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - extends DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] { - def and[T20](f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T20, T21](f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T20, T21, T22](f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ) => B + ): ReaderBuilder[A] +} + +sealed trait DependentField16[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 +] extends DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] { + def and[T17](f17: (A) => T17): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T17, T18](f17: (A) => T17, f18: (A) => T18): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T17, T18, T19]( + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T17, T18, T19, T20]( + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T17, T18, T19, T20, T21]( + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T17, T18, T19, T20, T21, T22]( + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + + def and[T17](f17: ReaderField[T17]): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T17, T18]( + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T17, T18, T19]( + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T17, T18, T19, T20]( + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T17, T18, T19, T20, T21]( + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T17, T18, T19, T20, T21, T22]( + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} - def and[T20](f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T20, T21](f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T20, T21, T22](f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField17[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 +] extends DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] { + def and[T18](f18: (A) => T18): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T18, T19](f18: (A) => T18, f19: (A) => T19): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T18, T19, T20]( + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T18, T19, T20, T21]( + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T18, T19, T20, T21, T22]( + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] -sealed trait DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) => B): ReaderBuilder[A] + def and[T18](f18: ReaderField[T18]): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T18, T19]( + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T18, T19, T20]( + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T18, T19, T20, T21]( + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T18, T19, T20, T21, T22]( + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } -sealed trait DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - extends DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] { - def and[T21](f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T21, T22](f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ) => B + ): ReaderBuilder[A] +} + +sealed trait DependentField18[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 +] extends DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] { + def and[T19](f19: (A) => T19): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T19, T20](f19: (A) => T19, f20: (A) => T20): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T19, T20, T21]( + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T19, T20, T21, T22]( + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + + def and[T19](f19: ReaderField[T19]): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T19, T20]( + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T19, T20, T21]( + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T19, T20, T21, T22]( + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} - def and[T21](f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T21, T22](f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField19[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 +] extends DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] { + def and[T20](f20: (A) => T20): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T20, T21](f20: (A) => T20, f21: (A) => T21): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T20, T21, T22]( + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] -sealed trait DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => B): ReaderBuilder[A] + def and[T20](f20: ReaderField[T20]): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T20, T21]( + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T20, T21, T22]( + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } -sealed trait DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - extends DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] { - def and[T22](f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ) => B + ): ReaderBuilder[A] +} + +sealed trait DependentField20[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 +] extends DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] { + def and[T21](f21: (A) => T21): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T21, T22](f21: (A) => T21, f22: (A) => T22): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + + def and[T21](f21: ReaderField[T21]): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T21, T22]( + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} - def and[T22](f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField21[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 +] extends DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] { + def and[T22](f22: (A) => T22): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] -sealed trait DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) => B): ReaderBuilder[A] + def and[T22](f22: ReaderField[T22]): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } -sealed trait DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - extends DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] { +sealed trait DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField22[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 +] extends DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] {} diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/FieldStyle.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/FieldStyle.scala index 521a2a54..9f3e80e0 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/FieldStyle.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/FieldStyle.scala @@ -4,25 +4,27 @@ import java.util.regex.Pattern import scala.annotation.StaticAnnotation -trait FieldStyle { self => +trait FieldStyle { self => def applyStyle(field: String): String - def andThen(that: FieldStyle): FieldStyle = field => that.applyStyle(self.applyStyle(field)) + def andThen(that: FieldStyle): FieldStyle = field => + that.applyStyle(self.applyStyle(field)) - def andThen(that: String => String): FieldStyle = field => that.apply(self.applyStyle(field)) + def andThen(that: String => String): FieldStyle = field => + that.apply(self.applyStyle(field)) def >>(that: FieldStyle): FieldStyle = andThen(that) def >>(that: String => String): FieldStyle = andThen(that) } - object FieldStyle { def apply(fun: String => String): FieldStyle = fun(_) class Ref(fieldStyle: FieldStyle) extends StaticAnnotation trait StyleReference extends FieldStyle { - final override def applyStyle(field: String): String = throw new RuntimeException("StyleReference should not be used at runtime") + final override def applyStyle(field: String): String = + throw new RuntimeException("StyleReference should not be used at runtime") } // Names transformations adopted from scala enumeratum diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/NotDescribedException.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/NotDescribedException.scala index e18f8bd2..ff8c3ad7 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/NotDescribedException.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/NotDescribedException.scala @@ -1,3 +1,4 @@ package tethys.derivation.builder -class NotDescribedException extends Exception("Definition should be in describe block", null) \ No newline at end of file +class NotDescribedException + extends Exception("Definition should be in describe block", null) diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/ReaderDescription.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/ReaderDescription.scala index a98e529c..810d8e26 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/ReaderDescription.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/ReaderDescription.scala @@ -1,8 +1,11 @@ package tethys.derivation.builder -case class ReaderDerivationConfig(fieldStyle: Option[FieldStyle], - isStrict: Boolean) { - def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = this.copy(fieldStyle = Some(fieldStyle)) +case class ReaderDerivationConfig( + fieldStyle: Option[FieldStyle], + isStrict: Boolean +) { + def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = + this.copy(fieldStyle = Some(fieldStyle)) def strict: ReaderDerivationConfig = this.copy(isStrict = true) } @@ -11,11 +14,15 @@ object ReaderDerivationConfig { fieldStyle = None, isStrict = false ) - def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = empty.withFieldStyle(fieldStyle) + def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = + empty.withFieldStyle(fieldStyle) def strict: ReaderDerivationConfig = empty.strict } -case class ReaderDescription[A](config: ReaderDerivationConfig, operations: Seq[ReaderDescription.BuilderOperation]) +case class ReaderDescription[A]( + config: ReaderDerivationConfig, + operations: Seq[ReaderDescription.BuilderOperation] +) object ReaderDescription { sealed trait Field[A] @@ -24,12 +31,20 @@ object ReaderDescription { final case class RawField[A](name: String) extends Field[A] } - sealed trait BuilderOperation object BuilderOperation { - final case class ExtractFieldAs[B, C](field: String, fun: B => C) extends BuilderOperation - final case class ExtractFieldValue(field: String, from: Seq[Field[_]], fun: Any) extends BuilderOperation - final case class ExtractFieldReader(field: String, from: Seq[Field[_]], fun: Any) extends BuilderOperation + final case class ExtractFieldAs[B, C](field: String, fun: B => C) + extends BuilderOperation + final case class ExtractFieldValue( + field: String, + from: Seq[Field[_]], + fun: Any + ) extends BuilderOperation + final case class ExtractFieldReader( + field: String, + from: Seq[Field[_]], + fun: Any + ) extends BuilderOperation } } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/ReaderField.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/ReaderField.scala index f37849d7..2db03095 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/ReaderField.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/ReaderField.scala @@ -3,4 +3,4 @@ package tethys.derivation.builder import scala.annotation.compileTimeOnly import scala.language.implicitConversions -sealed trait ReaderField[A] \ No newline at end of file +sealed trait ReaderField[A] diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/WriterBuilder.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/WriterBuilder.scala index 23ced87a..d50e8596 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/WriterBuilder.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/WriterBuilder.scala @@ -4,9 +4,7 @@ import tethys.derivation.builder.WriterBuilder._ import scala.annotation.compileTimeOnly - -/** - * Created by eld0727 on 22.04.17. +/** Created by eld0727 on 22.04.17. */ sealed trait WriterBuilder[A] { @@ -16,7 +14,9 @@ sealed trait WriterBuilder[A] { def update[B](field: A => B): FunApply[A, B] with WithRename[FunApply[A, B]] - def updatePartial[B](field: A => B): PartialFunApply[A, B] with WithRename[PartialFunApply[A, B]] + def updatePartial[B]( + field: A => B + ): PartialFunApply[A, B] with WithRename[PartialFunApply[A, B]] def add(name: String): FunApply[A, A] @@ -25,7 +25,9 @@ sealed trait WriterBuilder[A] { object WriterBuilder { - @compileTimeOnly("WriterBuilder should be defined in describe, jsonWriter of jsonReader macro") + @compileTimeOnly( + "WriterBuilder should be defined in describe, jsonWriter of jsonReader macro" + ) def apply[A <: Product]: WriterBuilder[A] = throw new NotDescribedException sealed trait WithRename[Res] { @@ -42,6 +44,3 @@ object WriterBuilder { def fromRoot[C](partial: PartialFunction[A, C]): WriterBuilder[A] } } - - - diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/WriterDescription.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/WriterDescription.scala index 2452de89..e0578eee 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/WriterDescription.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/builder/WriterDescription.scala @@ -2,27 +2,49 @@ package tethys.derivation.builder import tethys.derivation.builder.WriterDescription.BuilderOperation -case class WriterDerivationConfig(fieldStyle: Option[FieldStyle], discriminator: Option[String] = None) { - def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = this.copy(fieldStyle = Some(fieldStyle)) - def withDiscriminator(discriminator: String): WriterDerivationConfig = this.copy(discriminator = Some(discriminator)) +case class WriterDerivationConfig( + fieldStyle: Option[FieldStyle], + discriminator: Option[String] = None +) { + def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = + this.copy(fieldStyle = Some(fieldStyle)) + def withDiscriminator(discriminator: String): WriterDerivationConfig = + this.copy(discriminator = Some(discriminator)) } object WriterDerivationConfig { def empty: WriterDerivationConfig = WriterDerivationConfig(None) - def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = empty.copy(fieldStyle = Some(fieldStyle)) + def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = + empty.copy(fieldStyle = Some(fieldStyle)) } -case class WriterDescription[A](config: WriterDerivationConfig, operations: Seq[BuilderOperation[A]]) +case class WriterDescription[A]( + config: WriterDerivationConfig, + operations: Seq[BuilderOperation[A]] +) object WriterDescription { trait BuilderOperation[A] object BuilderOperation { case class Remove[A](field: String) extends BuilderOperation[A] - case class Update[A, B, C](field: String, name: Option[String], fun: B => C) extends BuilderOperation[A] - case class UpdateFromRoot[A, C](field: String, name: Option[String], fun: A => C) extends BuilderOperation[A] - case class UpdatePartial[A, B](field: String, name: Option[String], fun: PartialFunction[B, Any]) extends BuilderOperation[A] - case class UpdatePartialFromRoot[A](field: String, name: Option[String], fun: PartialFunction[A, Any]) extends BuilderOperation[A] + case class Update[A, B, C](field: String, name: Option[String], fun: B => C) + extends BuilderOperation[A] + case class UpdateFromRoot[A, C]( + field: String, + name: Option[String], + fun: A => C + ) extends BuilderOperation[A] + case class UpdatePartial[A, B]( + field: String, + name: Option[String], + fun: PartialFunction[B, Any] + ) extends BuilderOperation[A] + case class UpdatePartialFromRoot[A]( + field: String, + name: Option[String], + fun: PartialFunction[A, Any] + ) extends BuilderOperation[A] case class Add[A, B](field: String, fun: A => B) extends BuilderOperation[A] } -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/BaseMacroDefinitions.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/BaseMacroDefinitions.scala index ed32cea8..7f9bf02a 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/BaseMacroDefinitions.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/BaseMacroDefinitions.scala @@ -2,8 +2,7 @@ package tethys.derivation.impl import scala.reflect.macros.blackbox -/** - * Created by eld0727 on 22.04.17. +/** Created by eld0727 on 22.04.17. */ trait BaseMacroDefinitions { val c: blackbox.Context diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/CaseClassUtils.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/CaseClassUtils.scala index ed22dd24..e99f8ab9 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/CaseClassUtils.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/CaseClassUtils.scala @@ -2,8 +2,7 @@ package tethys.derivation.impl import scala.reflect.macros.blackbox -/** - * Created by eld0727 on 23.04.17. +/** Created by eld0727 on 23.04.17. */ trait CaseClassUtils extends LoggingUtils { val c: blackbox.Context @@ -12,13 +11,15 @@ trait CaseClassUtils extends LoggingUtils { case class CaseClassDefinition(tpe: Type, fields: List[CaseClassField]) case class CaseClassField(name: String, tpe: Type) - def caseClassDefinition[A: WeakTypeTag]: CaseClassDefinition = caseClassDefinition(weakTypeOf[A]) + def caseClassDefinition[A: WeakTypeTag]: CaseClassDefinition = + caseClassDefinition(weakTypeOf[A]) def caseClassDefinition(tpe: Type): CaseClassDefinition = { val ctor = getConstructor(tpe) CaseClassDefinition( tpe = tpe, - fields = ctor.paramLists.head.map(constructorParameterToCaseClassField(tpe)) + fields = + ctor.paramLists.head.map(constructorParameterToCaseClassField(tpe)) ) } @@ -26,20 +27,26 @@ trait CaseClassUtils extends LoggingUtils { def isCaseClass(tpe: Type): Boolean = { tpe.typeSymbol.isClass && - (tpe.typeSymbol.asClass.isCaseClass || - tpe.member(TermName("copy")).isMethod && - tpe <:< weakTypeOf[Product]) + (tpe.typeSymbol.asClass.isCaseClass || + tpe.member(TermName("copy")).isMethod && + tpe <:< weakTypeOf[Product]) } private def getConstructor(tpe: Type): MethodSymbol = { - tpe.decls.collectFirst { - case s: MethodSymbol if s.isPrimaryConstructor => s - }.getOrElse { - abort(s"Type '${tpe.typeSymbol.name.decodedName.toString} doesn't have main constructor") - } + tpe.decls + .collectFirst { + case s: MethodSymbol if s.isPrimaryConstructor => s + } + .getOrElse { + abort( + s"Type '${tpe.typeSymbol.name.decodedName.toString} doesn't have main constructor" + ) + } } - private def constructorParameterToCaseClassField(tpe: Type)(param: Symbol): CaseClassField = { + private def constructorParameterToCaseClassField( + tpe: Type + )(param: Symbol): CaseClassField = { val possibleRealType = tpe.decls.collectFirst { case s if s.name == param.name => s.typeSignatureIn(tpe).finalResultType } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/LoggingUtils.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/LoggingUtils.scala index 27fc9a51..c9793b79 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/LoggingUtils.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/LoggingUtils.scala @@ -2,13 +2,13 @@ package tethys.derivation.impl import scala.reflect.macros.blackbox -/** - * Created by eld0727 on 23.04.17. +/** Created by eld0727 on 23.04.17. */ trait LoggingUtils { val c: blackbox.Context - def info(msg: => String, force: Boolean = false): Unit = c.info(c.enclosingPosition, msg, force) + def info(msg: => String, force: Boolean = false): Unit = + c.info(c.enclosingPosition, msg, force) def warn(msg: String): Unit = c.warning(c.enclosingPosition, msg) def error(msg: String): Unit = c.error(c.enclosingPosition, msg) def abort(msg: String): Nothing = c.abort(c.enclosingPosition, msg) diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/MacroUtils.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/MacroUtils.scala index 72a9d809..6eac1564 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/MacroUtils.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/MacroUtils.scala @@ -2,10 +2,10 @@ package tethys.derivation.impl import scala.reflect.macros.blackbox -/** - * Created by eld0727 on 22.04.17. +/** Created by eld0727 on 22.04.17. */ -trait MacroUtils extends BaseMacroDefinitions +trait MacroUtils + extends BaseMacroDefinitions with CaseClassUtils with LoggingUtils { val c: blackbox.Context @@ -17,38 +17,41 @@ trait MacroUtils extends BaseMacroDefinitions case class SelectChain(chain: Seq[String]) - implicit lazy val selectChainUnliftable: Unliftable[SelectChain] = Unliftable[SelectChain] { - case Ident(name) => SelectChain(Seq(name.decodedName.toString)) - case select: Select => - def selectAllNames(s: Tree): Seq[String] = s match { - case Select(rest, name) => selectAllNames(rest) :+ name.decodedName.toString - case Ident(name) => Seq(name.decodedName.toString) - } - - SelectChain(selectAllNames(select)) - } - + implicit lazy val selectChainUnliftable: Unliftable[SelectChain] = + Unliftable[SelectChain] { + case Ident(name) => SelectChain(Seq(name.decodedName.toString)) + case select: Select => + def selectAllNames(s: Tree): Seq[String] = s match { + case Select(rest, name) => + selectAllNames(rest) :+ name.decodedName.toString + case Ident(name) => Seq(name.decodedName.toString) + } + + SelectChain(selectAllNames(select)) + } case class BuilderField(name: String, tpe: Type) - implicit lazy val builderFieldUnliftable: Unliftable[BuilderField] = Unliftable[BuilderField] { - case lambda@q"((${ValDef(_, name, _, _)}) => ${b: SelectChain})" - if b.chain.size == 2 && name.decodedName.toString == b.chain.head => - val tpe = lambda match { - case q"($_ => ${body: Tree})" => body.tpe - } - BuilderField(b.chain(1), tpe) - } + implicit lazy val builderFieldUnliftable: Unliftable[BuilderField] = + Unliftable[BuilderField] { + case lambda @ q"((${ValDef(_, name, _, _)}) => ${b: SelectChain})" + if b.chain.size == 2 && name.decodedName.toString == b.chain.head => + val tpe = lambda match { + case q"($_ => ${body: Tree})" => body.tpe + } + BuilderField(b.chain(1), tpe) + } object Untyped { def unapply(arg: Tree): Option[Tree] = arg match { case Typed(t, _) => Untyped.unapply(t) - case _ => Some(arg) + case _ => Some(arg) } } - implicit lazy val optionTreeUnliftable: Unliftable[Option[Tree]] = Unliftable[Option[Tree]] { - case q"$col.Some.apply[$_](${res: Tree})" => Some(res) - case q"$col.None" => None - } + implicit lazy val optionTreeUnliftable: Unliftable[Option[Tree]] = + Unliftable[Option[Tree]] { + case q"$col.Some.apply[$_](${res: Tree})" => Some(res) + case q"$col.None" => None + } } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderBuilderUtils.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderBuilderUtils.scala index c90461de..552c4ff0 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderBuilderUtils.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderBuilderUtils.scala @@ -9,7 +9,10 @@ trait ReaderBuilderUtils extends MacroUtils { val c: blackbox.Context import c.universe._ - case class ReaderMacroDescription(config: c.Expr[ReaderDerivationConfig], operations: Seq[ReaderMacroOperation]) + case class ReaderMacroDescription( + config: c.Expr[ReaderDerivationConfig], + operations: Seq[ReaderMacroOperation] + ) sealed trait Field { def name: String @@ -24,19 +27,38 @@ trait ReaderBuilderUtils extends MacroUtils { def field: String } object ReaderMacroOperation { - final case class ExtractFieldAs(field: String, tpe: Type, as: Type, fun: Tree) extends ReaderMacroOperation - final case class ExtractFieldValue(field: String, from: Seq[Field], fun: Tree) extends ReaderMacroOperation - final case class ExtractFieldReader(field: String, from: Seq[Field], fun: Tree) extends ReaderMacroOperation + final case class ExtractFieldAs( + field: String, + tpe: Type, + as: Type, + fun: Tree + ) extends ReaderMacroOperation + final case class ExtractFieldValue( + field: String, + from: Seq[Field], + fun: Tree + ) extends ReaderMacroOperation + final case class ExtractFieldReader( + field: String, + from: Seq[Field], + fun: Tree + ) extends ReaderMacroOperation } - implicit lazy val readerMacroDescriptionLiftable: Liftable[ReaderMacroDescription] = Liftable[ReaderMacroDescription] { + implicit lazy val readerMacroDescriptionLiftable + : Liftable[ReaderMacroDescription] = Liftable[ReaderMacroDescription] { case ReaderMacroDescription(config, operations) => q"$buildersPack.ReaderDescription(${config.tree} ,_root_.scala.Seq(..$operations))" } - implicit lazy val readerMacroDescriptionUnliftable: Unliftable[ReaderMacroDescription] = Unliftable[ReaderMacroDescription] { + implicit lazy val readerMacroDescriptionUnliftable: Unliftable[ + ReaderMacroDescription + ] = Unliftable[ReaderMacroDescription] { case q"$_.ReaderDescription.apply[$_](${config: Tree} ,$_.Seq.apply[$_](..${operations: Seq[ReaderMacroOperation]}))" => - ReaderMacroDescription(c.Expr[ReaderDerivationConfig](c.untypecheck(config)), operations) + ReaderMacroDescription( + c.Expr[ReaderDerivationConfig](c.untypecheck(config)), + operations + ) } implicit lazy val fieldLiftable: Liftable[Field] = Liftable[Field] { @@ -64,7 +86,8 @@ trait ReaderBuilderUtils extends MacroUtils { Field.RawField(name, tpe.tpe) } - implicit lazy val readerMacroOperationLiftable: Liftable[ReaderMacroOperation] = Liftable[ReaderMacroOperation] { + implicit lazy val readerMacroOperationLiftable + : Liftable[ReaderMacroOperation] = Liftable[ReaderMacroOperation] { case ReaderMacroOperation.ExtractFieldAs(field, tpe, as, fun) => q"$buildersPack.ReaderDescription.BuilderOperation.ExtractFieldAs[$as, $tpe]($field, $fun)" @@ -75,8 +98,8 @@ trait ReaderBuilderUtils extends MacroUtils { q"$buildersPack.ReaderDescription.BuilderOperation.ExtractFieldReader($field, _root_.scala.Seq(..$from), $fun)" } - - implicit lazy val readerMacroOperationUnliftable: Unliftable[ReaderMacroOperation] = Unliftable[ReaderMacroOperation] { + implicit lazy val readerMacroOperationUnliftable + : Unliftable[ReaderMacroOperation] = Unliftable[ReaderMacroOperation] { case q"$_.ReaderDescription.BuilderOperation.ExtractFieldAs.apply[${as: Tree}, ${tpe: Tree}](${field: String}, ${fun: Tree})" => ReaderMacroOperation.ExtractFieldAs(field, tpe.tpe, as.tpe, fun) diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderDescriptionCommons.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderDescriptionCommons.scala index 66160a5c..7cb36469 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderDescriptionCommons.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderDescriptionCommons.scala @@ -1,6 +1,10 @@ package tethys.derivation.impl.builder -import tethys.derivation.builder.{ReaderBuilder, ReaderDerivationConfig, ReaderDescription} +import tethys.derivation.builder.{ + ReaderBuilder, + ReaderDerivationConfig, + ReaderDescription +} import scala.reflect.macros.blackbox @@ -8,7 +12,9 @@ trait ReaderDescriptionCommons extends ReaderBuilderUtils { val c: blackbox.Context import c.universe._ - def convertReaderBuilder[A: WeakTypeTag](builder: Expr[ReaderBuilder[A]]): Expr[ReaderDescription[A]] = { + def convertReaderBuilder[A: WeakTypeTag]( + builder: Expr[ReaderBuilder[A]] + ): Expr[ReaderDescription[A]] = { val description = extractDescription(builder.tree) c.Expr[ReaderDescription[A]] { @@ -18,67 +24,100 @@ trait ReaderDescriptionCommons extends ReaderBuilderUtils { } } - protected lazy val emptyReaderConfig: Expr[ReaderDerivationConfig] = c.Expr[ReaderDerivationConfig](c.untypecheck( - q"tethys.derivation.builder.ReaderDerivationConfig.empty" - )) - - private def extractDescription(tree: Tree): ReaderMacroDescription = tree match { - // ===== ROOT ===== - case q"ReaderBuilder.apply[$_]" => - ReaderMacroDescription(emptyReaderConfig, Seq()) - - case q"$_.ReaderBuilder.apply[$_]" => - ReaderMacroDescription(emptyReaderConfig, Seq()) - - // ===== FieldAs ===== - case q"${rest: Tree}.extract[${tpe: Tree}](${f: BuilderField}).as[${as: Tree}].apply(${fun: Tree})" => - val description = extractDescription(rest) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldAs( - f.name, tpe.tpe, as.tpe, fun - )) - - // ===== FieldValue ===== - case q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" => - val description = extractDescription(rest) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldValue( - f.name, fs, fun - )) - - case q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" => - val description = extractDescription(rest) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldValue( - f.name, fs ++ ands, fun - )) - - // ===== FieldReader ===== - case q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" => - val description = extractDescription(rest) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldReader( - f.name, fs, fun - )) - - case q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" => - val description = extractDescription(rest) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldReader( - f.name, fs ++ ands, fun - )) - - // ===== FieldStyle ===== - case q"${rest: Tree}.fieldStyle(${style: Tree})" => - val description = extractDescription(rest) - description.copy(config = c.Expr[ReaderDerivationConfig]( - q"${description.config.tree}.withFieldStyle($style)" - )) - - // ===== isStrict ===== - case q"${rest: Tree}.strict" => - val description = extractDescription(rest) - description.copy(config = c.Expr[ReaderDerivationConfig]( - q"${description.config.tree}.strict" - )) - - // ===== NOPE ===== - case _ => - abort(s"Unknown builder tree: $tree") - } + protected lazy val emptyReaderConfig: Expr[ReaderDerivationConfig] = + c.Expr[ReaderDerivationConfig]( + c.untypecheck( + q"tethys.derivation.builder.ReaderDerivationConfig.empty" + ) + ) + + private def extractDescription(tree: Tree): ReaderMacroDescription = + tree match { + // ===== ROOT ===== + case q"ReaderBuilder.apply[$_]" => + ReaderMacroDescription(emptyReaderConfig, Seq()) + + case q"$_.ReaderBuilder.apply[$_]" => + ReaderMacroDescription(emptyReaderConfig, Seq()) + + // ===== FieldAs ===== + case q"${rest: Tree}.extract[${tpe: Tree}](${f: BuilderField}).as[${as: Tree}].apply(${fun: Tree})" => + val description = extractDescription(rest) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldAs( + f.name, + tpe.tpe, + as.tpe, + fun + ) + ) + + // ===== FieldValue ===== + case q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" => + val description = extractDescription(rest) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldValue( + f.name, + fs, + fun + ) + ) + + case q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[ + Field + ]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" => + val description = extractDescription(rest) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldValue( + f.name, + fs ++ ands, + fun + ) + ) + + // ===== FieldReader ===== + case q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" => + val description = extractDescription(rest) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldReader( + f.name, + fs, + fun + ) + ) + + case q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[ + Field + ]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" => + val description = extractDescription(rest) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldReader( + f.name, + fs ++ ands, + fun + ) + ) + + // ===== FieldStyle ===== + case q"${rest: Tree}.fieldStyle(${style: Tree})" => + val description = extractDescription(rest) + description.copy(config = + c.Expr[ReaderDerivationConfig]( + q"${description.config.tree}.withFieldStyle($style)" + ) + ) + + // ===== isStrict ===== + case q"${rest: Tree}.strict" => + val description = extractDescription(rest) + description.copy(config = + c.Expr[ReaderDerivationConfig]( + q"${description.config.tree}.strict" + ) + ) + + // ===== NOPE ===== + case _ => + abort(s"Unknown builder tree: $tree") + } } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala index ad20b634..8332aa06 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala @@ -4,10 +4,13 @@ import tethys.derivation.builder.{ReaderBuilder, ReaderDescription} import scala.reflect.macros.blackbox -class ReaderDescriptionMacro(val c: blackbox.Context) extends ReaderDescriptionCommons { +class ReaderDescriptionMacro(val c: blackbox.Context) + extends ReaderDescriptionCommons { import c.universe._ - def readerDescription[A: WeakTypeTag](builder: Expr[ReaderBuilder[A]]): Expr[ReaderDescription[A]] = { + def readerDescription[A: WeakTypeTag]( + builder: Expr[ReaderBuilder[A]] + ): Expr[ReaderDescription[A]] = { convertReaderBuilder[A](builder) } } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriteBuilderUtils.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriteBuilderUtils.scala index fab282d4..f2f8ddb1 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriteBuilderUtils.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriteBuilderUtils.scala @@ -5,74 +5,138 @@ import tethys.derivation.impl.MacroUtils import scala.reflect.macros.blackbox -/** - * Created by eld0727 on 24.04.17. +/** Created by eld0727 on 24.04.17. */ trait WriteBuilderUtils extends MacroUtils { val c: blackbox.Context import c.universe._ - case class MacroWriteDescription(tpe: Type, config: c.Expr[WriterDerivationConfig], operations: Seq[BuilderMacroOperation]) + case class MacroWriteDescription( + tpe: Type, + config: c.Expr[WriterDerivationConfig], + operations: Seq[BuilderMacroOperation] + ) - implicit lazy val macroWriteDescriptionLiftable: Liftable[MacroWriteDescription] = { + implicit lazy val macroWriteDescriptionLiftable + : Liftable[MacroWriteDescription] = { Liftable[MacroWriteDescription] { case MacroWriteDescription(tpe, config, operations) => q"$buildersPack.WriterDescription[$tpe](${config.tree}, _root_.scala.Seq(..$operations))" } } - implicit lazy val macroWriteDescriptionUnliftable: Unliftable[MacroWriteDescription] = { + implicit lazy val macroWriteDescriptionUnliftable + : Unliftable[MacroWriteDescription] = { Unliftable[MacroWriteDescription] { case q"$pack.WriterDescription.apply[${tpe: Tree}](${config: Tree}, $col.Seq.apply[$_](..${operations: Seq[BuilderMacroOperation]}))" => - MacroWriteDescription(tpe.tpe, c.Expr[WriterDerivationConfig](c.untypecheck(config)), operations) + MacroWriteDescription( + tpe.tpe, + c.Expr[WriterDerivationConfig](c.untypecheck(config)), + operations + ) } } sealed trait BuilderMacroOperation object BuilderMacroOperation { case class Remove(tpe: Type, field: String) extends BuilderMacroOperation - case class Update(tpe: Type, field: String, name: Option[Expr[String]], fun: Tree, from: Type, to: Type) extends BuilderMacroOperation - case class UpdateFromRoot(tpe: Type, field: String, name: Option[Expr[String]], fun: Tree, to: Type) extends BuilderMacroOperation - case class UpdatePartial(tpe: Type, field: String, name: Option[Expr[String]], fun: Tree, from: Type) extends BuilderMacroOperation - case class UpdatePartialFromRoot(tpe: Type, field: String, name: Option[Expr[String]], fun: Tree) extends BuilderMacroOperation - case class Add(tpe: Type, field: Expr[String], fun: Tree, to: Type) extends BuilderMacroOperation + case class Update( + tpe: Type, + field: String, + name: Option[Expr[String]], + fun: Tree, + from: Type, + to: Type + ) extends BuilderMacroOperation + case class UpdateFromRoot( + tpe: Type, + field: String, + name: Option[Expr[String]], + fun: Tree, + to: Type + ) extends BuilderMacroOperation + case class UpdatePartial( + tpe: Type, + field: String, + name: Option[Expr[String]], + fun: Tree, + from: Type + ) extends BuilderMacroOperation + case class UpdatePartialFromRoot( + tpe: Type, + field: String, + name: Option[Expr[String]], + fun: Tree + ) extends BuilderMacroOperation + case class Add(tpe: Type, field: Expr[String], fun: Tree, to: Type) + extends BuilderMacroOperation } - implicit lazy val builderMacroOperationLiftable: Liftable[BuilderMacroOperation] = Liftable[BuilderMacroOperation] { + implicit lazy val builderMacroOperationLiftable + : Liftable[BuilderMacroOperation] = Liftable[BuilderMacroOperation] { case BuilderMacroOperation.Remove(tpe, field) => q"$buildersPack.WriterDescription.BuilderOperation.Remove.apply[$tpe]($field)" case BuilderMacroOperation.Update(tpe, field, name, fun, from, to) => - q"$buildersPack.WriterDescription.BuilderOperation.Update.apply[$tpe, $from, $to]($field, ${name.map(_.tree)}, $fun)" + q"$buildersPack.WriterDescription.BuilderOperation.Update.apply[$tpe, $from, $to]($field, ${name + .map(_.tree)}, $fun)" case BuilderMacroOperation.UpdateFromRoot(tpe, field, name, fun, to) => - q"$buildersPack.WriterDescription.BuilderOperation.UpdateFromRoot.apply[$tpe, $to]($field, ${name.map(_.tree)}, $fun)" + q"$buildersPack.WriterDescription.BuilderOperation.UpdateFromRoot.apply[$tpe, $to]($field, ${name + .map(_.tree)}, $fun)" case BuilderMacroOperation.UpdatePartial(tpe, field, name, fun, to) => - q"$buildersPack.WriterDescription.BuilderOperation.UpdatePartial.apply[$tpe, $to]($field, ${name.map(_.tree)}, $fun)" + q"$buildersPack.WriterDescription.BuilderOperation.UpdatePartial.apply[$tpe, $to]($field, ${name + .map(_.tree)}, $fun)" case BuilderMacroOperation.UpdatePartialFromRoot(tpe, field, name, fun) => - q"$buildersPack.WriterDescription.BuilderOperation.UpdatePartialFromRoot.apply[$tpe]($field, ${name.map(_.tree)}, $fun)" + q"$buildersPack.WriterDescription.BuilderOperation.UpdatePartialFromRoot.apply[$tpe]($field, ${name + .map(_.tree)}, $fun)" case BuilderMacroOperation.Add(tpe, field, fun, to) => q"$buildersPack.WriterDescription.BuilderOperation.Add.apply[$tpe, $to](${field.tree}, $fun)" } - implicit lazy val builderMacroOperationUnliftable: Unliftable[BuilderMacroOperation] = Unliftable[BuilderMacroOperation] { + implicit lazy val builderMacroOperationUnliftable + : Unliftable[BuilderMacroOperation] = Unliftable[BuilderMacroOperation] { case q"$pack.BuilderOperation.Remove.apply[${tpe: Tree}](${field: String})" => BuilderMacroOperation.Remove(tpe.tpe, field) case q"$pack.BuilderOperation.Update.apply[${tpe: Tree}, ${from: Tree}, ${to: Tree}](${field: String}, ${name: Option[Tree]}, ${fun: Tree})" => - BuilderMacroOperation.Update(tpe.tpe, field, name.map(c.Expr[String](_)), fun, from.tpe, to.tpe) + BuilderMacroOperation.Update( + tpe.tpe, + field, + name.map(c.Expr[String](_)), + fun, + from.tpe, + to.tpe + ) case q"$pack.BuilderOperation.UpdateFromRoot.apply[${tpe: Tree}, ${to: Tree}](${field: String}, ${name: Option[Tree]}, ${fun: Tree})" => - BuilderMacroOperation.UpdateFromRoot(tpe.tpe, field, name.map(c.Expr[String](_)), fun, to.tpe) + BuilderMacroOperation.UpdateFromRoot( + tpe.tpe, + field, + name.map(c.Expr[String](_)), + fun, + to.tpe + ) case q"$pack.BuilderOperation.UpdatePartial.apply[${tpe: Tree}, ${from: Tree}](${field: String}, ${name: Option[Tree]}, ${fun: Tree})" => - BuilderMacroOperation.UpdatePartial(tpe.tpe, field, name.map(c.Expr[String](_)), fun, from.tpe) + BuilderMacroOperation.UpdatePartial( + tpe.tpe, + field, + name.map(c.Expr[String](_)), + fun, + from.tpe + ) case q"$pack.BuilderOperation.UpdatePartialFromRoot.apply[${tpe: Tree}](${field: String}, ${name: Option[Tree]}, ${fun: Tree})" => - BuilderMacroOperation.UpdatePartialFromRoot(tpe.tpe, field, name.map(c.Expr[String](_)), fun) + BuilderMacroOperation.UpdatePartialFromRoot( + tpe.tpe, + field, + name.map(c.Expr[String](_)), + fun + ) case q"$pack.BuilderOperation.Add.apply[${tpe: Tree}, ${to: Tree}](${field: Tree}, ${fun: Tree})" => BuilderMacroOperation.Add(tpe.tpe, c.Expr(field), fun, to.tpe) diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriterBuilderCommons.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriterBuilderCommons.scala index 154a0f3a..e0cd7905 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriterBuilderCommons.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriterBuilderCommons.scala @@ -1,6 +1,10 @@ package tethys.derivation.impl.builder -import tethys.derivation.builder.{WriterBuilder, WriterDerivationConfig, WriterDescription} +import tethys.derivation.builder.{ + WriterBuilder, + WriterDerivationConfig, + WriterDescription +} import scala.reflect.macros.blackbox @@ -8,7 +12,9 @@ trait WriterBuilderCommons extends WriteBuilderUtils { val c: blackbox.Context import c.universe._ - protected def convertWriterBuilder[A: WeakTypeTag](builder: Expr[WriterBuilder[A]]): Expr[WriterDescription[A]] = { + protected def convertWriterBuilder[A: WeakTypeTag]( + builder: Expr[WriterBuilder[A]] + ): Expr[WriterDescription[A]] = { val description = extractSimpleDescription(builder.tree) checkOperations(description.operations) c.Expr[WriterDescription[A]] { @@ -18,107 +24,184 @@ trait WriterBuilderCommons extends WriteBuilderUtils { } } - protected lazy val emptyWriterConfig: Expr[WriterDerivationConfig] = c.Expr[WriterDerivationConfig](c.untypecheck( - q"tethys.derivation.builder.WriterDerivationConfig.empty" - )) - - private def extractSimpleDescription(tree: Tree): MacroWriteDescription = tree match { - // ===== ROOT ===== - case q"WriterBuilder.apply[${tpe: Tree}]" => - MacroWriteDescription(tpe.tpe, emptyWriterConfig, Seq()) - - case q"$_.WriterBuilder.apply[${tpe: Tree}]" => - MacroWriteDescription(tpe.tpe, emptyWriterConfig, Seq()) - - // ===== remove ===== - case q"${rest: Tree}.remove[${tpe: Tree}](${f: BuilderField})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.Remove(description.tpe, f.name) - ) - - // ===== rename ===== - case q"${rest: Tree}.rename[${a: Tree}](${f: BuilderField})(${rename: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.Update(description.tpe, f.name, Some(c.Expr(rename)), q"identity[${a.tpe}]", a.tpe, a.tpe) - ) - - // ===== update ===== - case q"${rest: Tree}.update[${a: Tree}](${f: BuilderField}).apply[${b: Tree}](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.Update(description.tpe, f.name, None, updater, a.tpe, b.tpe) - ) - - // ===== update with rename ===== - case q"${rest: Tree}.update[${a: Tree}](${f: BuilderField}).withRename(${rename: Tree}).apply[${b: Tree}](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.Update(description.tpe, f.name, Some(c.Expr(rename)), updater, a.tpe, b.tpe) - ) - - // ===== update from root ===== - case q"${rest: Tree}.update[$_](${f: BuilderField}).fromRoot[${b: Tree}](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.UpdateFromRoot(description.tpe, f.name, None, updater, b.tpe) - ) - - // ===== update from root with rename ===== - case q"${rest: Tree}.update[$_](${f: BuilderField}).withRename(${rename: Tree}).fromRoot[${b: Tree}](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.UpdateFromRoot(description.tpe, f.name, Some(c.Expr(rename)), updater, b.tpe) + protected lazy val emptyWriterConfig: Expr[WriterDerivationConfig] = + c.Expr[WriterDerivationConfig]( + c.untypecheck( + q"tethys.derivation.builder.WriterDerivationConfig.empty" ) - - // ===== add ===== - case q"${rest: Tree}.add(${f: Tree}).apply[${a: Tree}](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.Add(description.tpe, c.Expr(f), updater, a.tpe) - ) - - // ===== update partial ===== - case q"${rest: Tree}.updatePartial[${a: Tree}](${f: BuilderField}).apply[$_](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.UpdatePartial(description.tpe, f.name, None, updater, a.tpe) - ) - - // ===== update partial with rename ===== - case q"${rest: Tree}.updatePartial[${a: Tree}](${f: BuilderField}).withRename(${rename: Tree}).apply[$_](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.UpdatePartial(description.tpe, f.name, Some(c.Expr(rename)), updater, a.tpe) - ) - - // ===== update partial from root ===== - case q"${rest: Tree}.updatePartial[${a: Tree}](${f: BuilderField}).fromRoot[$_](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.UpdatePartialFromRoot(description.tpe, f.name, None, updater) - ) - - // ===== update partial from root with rename ===== - case q"${rest: Tree}.updatePartial[${a: Tree}](${f: BuilderField}).withRename(${rename: Tree}).fromRoot[$_](${updater: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(operations = description.operations :+ - BuilderMacroOperation.UpdatePartialFromRoot(description.tpe, f.name, Some(c.Expr(rename)), updater) - ) - - // ===== FieldStyle ===== - case q"${rest: Tree}.fieldStyle(${style: Tree})" => - val description = extractSimpleDescription(rest) - description.copy(config = c.Expr[WriterDerivationConfig]( - q"${description.config.tree}.withFieldStyle($style)" - )) - - // ===== NOPE ===== - case _ => abort(s"unknown tree: ${show(tree)}") - } + ) + + private def extractSimpleDescription(tree: Tree): MacroWriteDescription = + tree match { + // ===== ROOT ===== + case q"WriterBuilder.apply[${tpe: Tree}]" => + MacroWriteDescription(tpe.tpe, emptyWriterConfig, Seq()) + + case q"$_.WriterBuilder.apply[${tpe: Tree}]" => + MacroWriteDescription(tpe.tpe, emptyWriterConfig, Seq()) + + // ===== remove ===== + case q"${rest: Tree}.remove[${tpe: Tree}](${f: BuilderField})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.Remove(description.tpe, f.name) + ) + + // ===== rename ===== + case q"${rest: Tree}.rename[${a: Tree}](${f: BuilderField})(${rename: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.Update( + description.tpe, + f.name, + Some(c.Expr(rename)), + q"identity[${a.tpe}]", + a.tpe, + a.tpe + ) + ) + + // ===== update ===== + case q"${rest: Tree}.update[${a: Tree}](${f: BuilderField}).apply[${b: Tree}](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.Update( + description.tpe, + f.name, + None, + updater, + a.tpe, + b.tpe + ) + ) + + // ===== update with rename ===== + case q"${rest: Tree}.update[${a: Tree}](${f: BuilderField}).withRename(${rename: Tree}).apply[${b: Tree}](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.Update( + description.tpe, + f.name, + Some(c.Expr(rename)), + updater, + a.tpe, + b.tpe + ) + ) + + // ===== update from root ===== + case q"${rest: Tree}.update[$_](${f: BuilderField}).fromRoot[${b: Tree}](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.UpdateFromRoot( + description.tpe, + f.name, + None, + updater, + b.tpe + ) + ) + + // ===== update from root with rename ===== + case q"${rest: Tree}.update[$_](${f: BuilderField}).withRename(${rename: Tree}).fromRoot[${b: Tree}](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.UpdateFromRoot( + description.tpe, + f.name, + Some(c.Expr(rename)), + updater, + b.tpe + ) + ) + + // ===== add ===== + case q"${rest: Tree}.add(${f: Tree}).apply[${a: Tree}](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.Add( + description.tpe, + c.Expr(f), + updater, + a.tpe + ) + ) + + // ===== update partial ===== + case q"${rest: Tree}.updatePartial[${a: Tree}](${f: BuilderField}).apply[$_](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.UpdatePartial( + description.tpe, + f.name, + None, + updater, + a.tpe + ) + ) + + // ===== update partial with rename ===== + case q"${rest: Tree}.updatePartial[${a: Tree}](${f: BuilderField}).withRename(${rename: Tree}).apply[$_](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.UpdatePartial( + description.tpe, + f.name, + Some(c.Expr(rename)), + updater, + a.tpe + ) + ) + + // ===== update partial from root ===== + case q"${rest: Tree}.updatePartial[${a: Tree}](${f: BuilderField}).fromRoot[$_](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.UpdatePartialFromRoot( + description.tpe, + f.name, + None, + updater + ) + ) + + // ===== update partial from root with rename ===== + case q"${rest: Tree}.updatePartial[${a: Tree}](${f: BuilderField}).withRename(${rename: Tree}).fromRoot[$_](${updater: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(operations = + description.operations :+ + BuilderMacroOperation.UpdatePartialFromRoot( + description.tpe, + f.name, + Some(c.Expr(rename)), + updater + ) + ) + + // ===== FieldStyle ===== + case q"${rest: Tree}.fieldStyle(${style: Tree})" => + val description = extractSimpleDescription(rest) + description.copy(config = + c.Expr[WriterDerivationConfig]( + q"${description.config.tree}.withFieldStyle($style)" + ) + ) + + // ===== NOPE ===== + case _ => abort(s"unknown tree: ${show(tree)}") + } private def checkOperations(operations: Seq[BuilderMacroOperation]): Unit = { - //TODO + // TODO } } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriterDescriptorMacro.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriterDescriptorMacro.scala index 01303858..06cc0961 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriterDescriptorMacro.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/builder/WriterDescriptorMacro.scala @@ -4,14 +4,16 @@ import tethys.derivation.builder.{WriterBuilder, WriterDescription} import scala.reflect.macros.blackbox -/** - * Created by eld0727 on 23.04.17. +/** Created by eld0727 on 23.04.17. */ -class WriterDescriptorMacro(val c: blackbox.Context) extends WriterBuilderCommons { +class WriterDescriptorMacro(val c: blackbox.Context) + extends WriterBuilderCommons { import c.universe._ - def simpleDescription[A: WeakTypeTag](builder: Expr[WriterBuilder[A]]): Expr[WriterDescription[A]] = { + def simpleDescription[A: WeakTypeTag]( + builder: Expr[WriterBuilder[A]] + ): Expr[WriterDescription[A]] = { convertWriterBuilder[A](builder) } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/AutoDerivationMacro.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/AutoDerivationMacro.scala index 33c8c8e6..115383ed 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/AutoDerivationMacro.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/AutoDerivationMacro.scala @@ -5,13 +5,16 @@ import tethys.{JsonObjectWriter, JsonReader, JsonWriter} import scala.reflect.macros.blackbox -class AutoDerivationMacro(val c: blackbox.Context) extends WriterDerivation with ReaderDerivation { +class AutoDerivationMacro(val c: blackbox.Context) + extends WriterDerivation + with ReaderDerivation { import c.universe._ override protected def showError: Boolean = true - def jsonWriter[A: WeakTypeTag]: Expr[LowPriorityInstance[JsonObjectWriter[A]]] = { + def jsonWriter[A: WeakTypeTag] + : Expr[LowPriorityInstance[JsonObjectWriter[A]]] = { val tpe = weakTypeOf[A] val clazz = classSym(tpe) val instance: Expr[JsonWriter[A]] = { @@ -54,12 +57,11 @@ class AutoDerivationMacro(val c: blackbox.Context) extends WriterDerivation with case q"$_.${method: TermName}[${tt: Tree}]" => method -> tt.tpe } - val counts = tpes.map { - case (m1, t1) => - tpes.foldLeft(0) { - case (count, (m2, t2)) if m1 == m2 && t1 =:= t2 => count + 1 - case (count, _) => count - } + val counts = tpes.map { case (m1, t1) => + tpes.foldLeft(0) { + case (count, (m2, t2)) if m1 == m2 && t1 =:= t2 => count + 1 + case (count, _) => count + } } counts.exists(_ > 1) diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/DerivationUtils.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/DerivationUtils.scala index 7cc1cb9b..affb6b94 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/DerivationUtils.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/DerivationUtils.scala @@ -22,18 +22,20 @@ trait DerivationUtils extends LoggingUtils { sym.typeParams.map { param => val paramTpe = param.asType.toType val index = subst.indexWhere(_ =:= paramTpe) - if(index != -1) baseArgs(index) - else fail(s"$sym contains additional type parameter that can't be derived in compile time") + if (index != -1) baseArgs(index) + else + fail( + s"$sym contains additional type parameter that can't be derived in compile time" + ) } } appliedType(sym, substituteArgs) } - tpes.foldLeft(List.empty[Type]) { - case (acc, t) => - if(!acc.exists(_ =:= t)) t :: acc - else acc + tpes.foldLeft(List.empty[Type]) { case (acc, t) => + if (!acc.exists(_ =:= t)) t :: acc + else acc } } @@ -41,7 +43,8 @@ trait DerivationUtils extends LoggingUtils { classSym.knownDirectSubclasses.toList.flatMap { child0 => val child = child0.asClass child.typeSignature // Workaround for - if (child.isSealed && (child.isAbstract || child.isTrait)) collectSubclasses(child) + if (child.isSealed && (child.isAbstract || child.isTrait)) + collectSubclasses(child) else List(child) } } diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/ReaderDerivation.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/ReaderDerivation.scala index 59815c4e..2dab31b9 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/ReaderDerivation.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/ReaderDerivation.scala @@ -3,7 +3,10 @@ package tethys.derivation.impl.derivation import tethys.JsonReader import tethys.derivation.builder.FieldStyle.StyleReference import tethys.derivation.builder.{FieldStyle, ReaderDerivationConfig} -import tethys.derivation.impl.builder.{ReaderBuilderUtils, ReaderDescriptionCommons} +import tethys.derivation.impl.builder.{ + ReaderBuilderUtils, + ReaderDescriptionCommons +} import tethys.derivation.impl.{BaseMacroDefinitions, CaseClassUtils} import tethys.readers.tokens.TokenIterator import tethys.readers.{FieldName, JsonReaderDefaultValue} @@ -11,7 +14,7 @@ import tethys.readers.{FieldName, JsonReaderDefaultValue} import scala.reflect.macros.blackbox trait ReaderDerivation - extends BaseMacroDefinitions + extends BaseMacroDefinitions with CaseClassUtils with DerivationUtils with ReaderDescriptionCommons { @@ -26,51 +29,65 @@ trait ReaderDerivation private val tokenIteratorType = tq"${typeOf[TokenIterator]}" private val readerErrorCompanion = q"$readersPack.ReaderError" - private val primitiveReadersCompanion = q"$readersPack.instances.PrimitiveReaders" + private val primitiveReadersCompanion = + q"$readersPack.instances.PrimitiveReaders" - private val jsonReaderDefaultValueType = tq"$readersPack.JsonReaderDefaultValue" + private val jsonReaderDefaultValueType = + tq"$readersPack.JsonReaderDefaultValue" private val jsonReaderType = tq"$tethysPack.JsonReader" private val somethingChanged = TermName(c.freshName("somethingChanged")) - - private sealed trait ReaderField { def value: TermName } - private case class SimpleField(name: String, - tpe: Type, - jsonName: String, - value: TermName, - isInitialized: TermName) extends ReaderField - - private case class ExtractedField(name: String, - tpe: Type, - functionName: TermName, - args: List[FunctionArgument], - body: Tree, - value: TermName, - isInitialized: TermName) extends ReaderField - - private case class FromExtractedReader(name: String, - tpe: Type, - jsonName: String, - functionName: TermName, - args: List[FunctionArgument], - body: Tree, - value: TermName, - isInitialized: TermName, - tempIterator: TermName) extends ReaderField - - private case class FunctionArgument(field: Field, value: TermName, isInitialized: TermName) + private case class SimpleField( + name: String, + tpe: Type, + jsonName: String, + value: TermName, + isInitialized: TermName + ) extends ReaderField + + private case class ExtractedField( + name: String, + tpe: Type, + functionName: TermName, + args: List[FunctionArgument], + body: Tree, + value: TermName, + isInitialized: TermName + ) extends ReaderField + + private case class FromExtractedReader( + name: String, + tpe: Type, + jsonName: String, + functionName: TermName, + args: List[FunctionArgument], + body: Tree, + value: TermName, + isInitialized: TermName, + tempIterator: TermName + ) extends ReaderField + + private case class FunctionArgument( + field: Field, + value: TermName, + isInitialized: TermName + ) def deriveReader[A: WeakTypeTag]: Expr[JsonReader[A]] = { deriveReader(ReaderMacroDescription(emptyReaderConfig, Seq())) } - def deriveReader[A: WeakTypeTag](description: ReaderMacroDescription): Expr[JsonReader[A]] = { + def deriveReader[A: WeakTypeTag]( + description: ReaderMacroDescription + ): Expr[JsonReader[A]] = { val tpe = weakTypeOf[A] val classDef = caseClassDefinition(tpe) - val config = scala.util.Try(c.eval(description.config)).getOrElse(c.eval(description.config)) + val config = scala.util + .Try(c.eval(description.config)) + .getOrElse(c.eval(description.config)) val readerFields = applyFieldStyle(config.fieldStyle) .andThen(applyOperations(description.operations)) @@ -85,7 +102,9 @@ trait ReaderDerivation }) val (typeReaders, readerTrees) = allocateReaders(readerFields) - val (typeDefaultValues, defaultValuesTrees) = allocateDefaultValues(readerFields) + val (typeDefaultValues, defaultValuesTrees) = allocateDefaultValues( + readerFields + ) val variablesTrees = allocateVariables(readerFields, typeDefaultValues) val functionsTrees = allocateFunctions(readerFields) val cases = allocateCases(config.isStrict, readerFields, typeReaders) @@ -131,21 +150,30 @@ trait ReaderDerivation } } - private def applyFieldStyle(fieldStyle: Option[FieldStyle]): List[SimpleField] => List[SimpleField] = readerFields => { + private def applyFieldStyle( + fieldStyle: Option[FieldStyle] + ): List[SimpleField] => List[SimpleField] = readerFields => { fieldStyle.fold(readerFields) { style => readerFields.map(f => f.copy(jsonName = style.applyStyle(f.jsonName))) } } - private def applyOperations(operations: Seq[ReaderMacroOperation]): List[ReaderField] => List[ReaderField] = readerFields => { - def mapField(fields: List[ReaderField], name: String)(f: SimpleField => ReaderField): List[ReaderField] = { + private def applyOperations( + operations: Seq[ReaderMacroOperation] + ): List[ReaderField] => List[ReaderField] = readerFields => { + def mapField(fields: List[ReaderField], name: String)( + f: SimpleField => ReaderField + ): List[ReaderField] = { fields.map { case field: SimpleField if field.name == name => f(field) - case field => field + case field => field } } - def buildArgument(field: Field, readerFields: List[ReaderField]): FunctionArgument = { + def buildArgument( + field: Field, + readerFields: List[ReaderField] + ): FunctionArgument = { field match { case Field.ClassField(name, _) => readerFields.collectFirst { @@ -162,46 +190,54 @@ trait ReaderDerivation List(FunctionArgument(field, f.value, f.isInitialized)) case f: ExtractedField => f.args.collectFirst { - case arg@FunctionArgument(rf: Field.RawField, _, _) if rf.name == name && rf.tpe =:= tpe => + case arg @ FunctionArgument(rf: Field.RawField, _, _) + if rf.name == name && rf.tpe =:= tpe => arg } case f: FromExtractedReader => f.args.collectFirst { - case arg@FunctionArgument(rf: Field.RawField, _, _) if rf.name == name && rf.tpe =:= tpe => + case arg @ FunctionArgument(rf: Field.RawField, _, _) + if rf.name == name && rf.tpe =:= tpe => arg } case _ => List.empty[FunctionArgument] } - possibleArg.headOption.getOrElse(FunctionArgument( - field = Field.RawField(name, tpe), - value = TermName(c.freshName(name + "Value")), - isInitialized = TermName(c.freshName(name + "Init")) - )) + possibleArg.headOption.getOrElse( + FunctionArgument( + field = Field.RawField(name, tpe), + value = TermName(c.freshName(name + "Value")), + isInitialized = TermName(c.freshName(name + "Init")) + ) + ) } } - operations.foldLeft(readerFields) { - case (fields, operation) => - operation match { - case ReaderMacroOperation.ExtractFieldAs(field, tpe, as, fun) => - mapField(fields, field)(f => ExtractedField( + operations.foldLeft(readerFields) { case (fields, operation) => + operation match { + case ReaderMacroOperation.ExtractFieldAs(field, tpe, as, fun) => + mapField(fields, field)(f => + ExtractedField( name = field, tpe = tpe, functionName = TermName(c.freshName(field + "Fun")), - args = List(FunctionArgument( - field = Field.RawField(f.jsonName, as), - value = TermName(c.freshName(field + "Value")), - isInitialized = TermName(c.freshName(field + "Init")) - )), + args = List( + FunctionArgument( + field = Field.RawField(f.jsonName, as), + value = TermName(c.freshName(field + "Value")), + isInitialized = TermName(c.freshName(field + "Init")) + ) + ), body = fun, value = f.value, isInitialized = f.isInitialized - )) + ) + ) - case ReaderMacroOperation.ExtractFieldValue(field, from, fun) => - mapField(fields, field)(f => ExtractedField( + case ReaderMacroOperation.ExtractFieldValue(field, from, fun) => + mapField(fields, field)(f => + ExtractedField( name = field, tpe = f.tpe, functionName = TermName(c.freshName(field + "Fun")), @@ -209,9 +245,11 @@ trait ReaderDerivation body = fun, value = f.value, isInitialized = f.isInitialized - )) - case ReaderMacroOperation.ExtractFieldReader(field, from, fun) => - mapField(fields, field)(f => FromExtractedReader( + ) + ) + case ReaderMacroOperation.ExtractFieldReader(field, from, fun) => + mapField(fields, field)(f => + FromExtractedReader( name = field, tpe = f.tpe, jsonName = f.jsonName, @@ -221,12 +259,15 @@ trait ReaderDerivation value = f.value, isInitialized = f.isInitialized, tempIterator = TermName(c.freshName(field + "TmpIter")) - )) - } + ) + ) + } } } - private def allocateReaders(readerFields: List[ReaderField]): (List[(Type, TermName)], List[Tree]) = { + private def allocateReaders( + readerFields: List[ReaderField] + ): (List[(Type, TermName)], List[Tree]) = { val jsonTypes = readerFields.flatMap { case f: SimpleField => List(f.tpe) @@ -240,13 +281,20 @@ trait ReaderDerivation case ((types, trees), tpe) if !types.exists(_._1 =:= tpe) => val term = TermName(c.freshName()) val reader = { - if (tpe =:= typeOf[Short]) q"private[this] val $term = $primitiveReadersCompanion.ShortJsonReader" - else if (tpe =:= typeOf[Int]) q"private[this] val $term = $primitiveReadersCompanion.IntJsonReader" - else if (tpe =:= typeOf[Long]) q"private[this] val $term = $primitiveReadersCompanion.LongJsonReader" - else if (tpe =:= typeOf[Float]) q"private[this] val $term = $primitiveReadersCompanion.FloatJsonReader" - else if (tpe =:= typeOf[Double]) q"private[this] val $term = $primitiveReadersCompanion.DoubleJsonReader" - else if (tpe =:= typeOf[Boolean]) q"private[this] val $term = $primitiveReadersCompanion.BooleanJsonReader" - else q"private[this] lazy val $term = implicitly[$jsonReaderType[$tpe]]" + if (tpe =:= typeOf[Short]) + q"private[this] val $term = $primitiveReadersCompanion.ShortJsonReader" + else if (tpe =:= typeOf[Int]) + q"private[this] val $term = $primitiveReadersCompanion.IntJsonReader" + else if (tpe =:= typeOf[Long]) + q"private[this] val $term = $primitiveReadersCompanion.LongJsonReader" + else if (tpe =:= typeOf[Float]) + q"private[this] val $term = $primitiveReadersCompanion.FloatJsonReader" + else if (tpe =:= typeOf[Double]) + q"private[this] val $term = $primitiveReadersCompanion.DoubleJsonReader" + else if (tpe =:= typeOf[Boolean]) + q"private[this] val $term = $primitiveReadersCompanion.BooleanJsonReader" + else + q"private[this] lazy val $term = implicitly[$jsonReaderType[$tpe]]" } (tpe -> term :: types, reader :: trees) @@ -254,7 +302,9 @@ trait ReaderDerivation } } - private def allocateDefaultValues(readerFields: List[ReaderField]): (List[(Type, TermName)], List[Tree]) = { + private def allocateDefaultValues( + readerFields: List[ReaderField] + ): (List[(Type, TermName)], List[Tree]) = { val allTypes = readerFields.flatMap { case f: SimpleField => List(f.tpe) @@ -274,7 +324,10 @@ trait ReaderDerivation } } - private def allocateVariables(readerFields: List[ReaderField], typeDefaultValues: List[(Type, TermName)]): List[Tree] = { + private def allocateVariables( + readerFields: List[ReaderField], + typeDefaultValues: List[(Type, TermName)] + ): List[Tree] = { val possibleValues: List[(TermName, Type)] = readerFields.flatMap { case f: SimpleField => List(f.value -> f.tpe) @@ -286,7 +339,8 @@ trait ReaderDerivation val (_, values) = possibleValues.foldLeft(List[TermName](), List[Tree]()) { case ((allocated, trees), (value, tpe)) if !allocated.contains(value) => - val tree = q"var $value: $tpe = ${typeDefaultValues.find(_._1 =:= tpe).get._2}" + val tree = + q"var $value: $tpe = ${typeDefaultValues.find(_._1 =:= tpe).get._2}" (value :: allocated, tree :: trees) case (res, _) => res @@ -304,47 +358,74 @@ trait ReaderDerivation .distinct .map(term => q"var $term: Boolean = false") - val tempIterators = readerFields.collect { - case f: FromExtractedReader => - q"var ${f.tempIterator}: $tokenIteratorType = null" + val tempIterators = readerFields.collect { case f: FromExtractedReader => + q"var ${f.tempIterator}: $tokenIteratorType = null" } values ::: inits ::: tempIterators } - private def allocateFunctions(readerFields: List[ReaderField]): List[Tree] = readerFields.collect { - case f: ExtractedField => - q"private[this] val ${f.functionName} = ${f.body}" - case f: FromExtractedReader => - q"private[this] val ${f.functionName} = ${f.body}" - } - + private def allocateFunctions(readerFields: List[ReaderField]): List[Tree] = + readerFields.collect { + case f: ExtractedField => + q"private[this] val ${f.functionName} = ${f.body}" + case f: FromExtractedReader => + q"private[this] val ${f.functionName} = ${f.body}" + } - private def allocateCases(isStrict: Boolean, readerFields: List[ReaderField], readers: List[(Type, TermName)]): List[CaseDef] = { + private def allocateCases( + isStrict: Boolean, + readerFields: List[ReaderField], + readers: List[(Type, TermName)] + ): List[CaseDef] = { sealed trait FieldDef { def jsonName: String } - case class SimpleFieldDef(jsonName: String, reader: TermName, value: TermName, isInitialized: TermName) extends FieldDef - case class CustomReaderFieldDef(jsonName: String, tempIterator: TermName) extends FieldDef + case class SimpleFieldDef( + jsonName: String, + reader: TermName, + value: TermName, + isInitialized: TermName + ) extends FieldDef + case class CustomReaderFieldDef(jsonName: String, tempIterator: TermName) + extends FieldDef def findReader(tpe: Type) = readers.find(_._1 =:= tpe).get._2 val fieldDefs: List[FieldDef] = readerFields.flatMap { case f: SimpleField => - List(SimpleFieldDef(f.jsonName, findReader(f.tpe), f.value, f.isInitialized)) + List( + SimpleFieldDef( + f.jsonName, + findReader(f.tpe), + f.value, + f.isInitialized + ) + ) case f: ExtractedField => f.args.collect { - case FunctionArgument(Field.RawField(jsonName, tpe), value, isInitialized) => + case FunctionArgument( + Field.RawField(jsonName, tpe), + value, + isInitialized + ) => SimpleFieldDef(jsonName, findReader(tpe), value, isInitialized) } case f: FromExtractedReader => CustomReaderFieldDef(f.jsonName, f.tempIterator) :: f.args.collect { - case FunctionArgument(Field.RawField(jsonName, tpe), value, isInitialized) => + case FunctionArgument( + Field.RawField(jsonName, tpe), + value, + isInitialized + ) => SimpleFieldDef(jsonName, findReader(tpe), value, isInitialized) } } - val gropedDefs = fieldDefs.distinct.groupBy(_.jsonName).toList.sortBy(f => fieldDefs.indexWhere(_.jsonName == f._1)) + val gropedDefs = fieldDefs.distinct + .groupBy(_.jsonName) + .toList + .sortBy(f => fieldDefs.indexWhere(_.jsonName == f._1)) val res = gropedDefs.map { case (jsonName, List(fieldDef)) => @@ -360,13 +441,15 @@ trait ReaderDerivation } case (jsonName, defs) => val fieldIterator = TermName(c.freshName(jsonName + "Iter")) - val body = q"val $fieldIterator = $tokenIteratorTerm.collectExpression()" :: defs.flatMap { - case SimpleFieldDef(_, reader, value, isInitialized) => - q"$value = $reader.read($fieldIterator.copy())" :: - q"$isInitialized = true" :: Nil - case CustomReaderFieldDef(_, tempIterator) => - q"$tempIterator = $fieldIterator.copy()" :: Nil - } + val body = + q"val $fieldIterator = $tokenIteratorTerm.collectExpression()" :: defs + .flatMap { + case SimpleFieldDef(_, reader, value, isInitialized) => + q"$value = $reader.read($fieldIterator.copy())" :: + q"$isInitialized = true" :: Nil + case CustomReaderFieldDef(_, tempIterator) => + q"$tempIterator = $fieldIterator.copy()" :: Nil + } cq""" $jsonName => ..$body @@ -374,48 +457,65 @@ trait ReaderDerivation } val defaultCase = { - if(isStrict) { + if (isStrict) { val unexpectedName = TermName(c.freshName("unexpectedName")) val expectedNames = gropedDefs.map(_._1).mkString("'", "', '", "'") cq""" $unexpectedName => $readerErrorCompanion.wrongJson("unexpected field '" + $unexpectedName + "', expected one of " + $expectedNames)($fieldNameTmp) """ - } - else cq"_ => $tokenIteratorTerm.skipExpression()" + } else cq"_ => $tokenIteratorTerm.skipExpression()" } (res :+ defaultCase): List[CaseDef] } - private def allocateRawFieldsPostProcessing(readerFields: List[ReaderField]): Tree = { + private def allocateRawFieldsPostProcessing( + readerFields: List[ReaderField] + ): Tree = { type Res = (List[TermName], List[(Tree, String)], List[Tree]) - def buildTree(tpe: Type, jsonName: String, value: TermName, isInitialized: TermName): Res => Res = { - case (processed, possiblyNotInitialized, trees) => - extractDefaultValue(tpe) match { - case Some(defaultValue) => - val tree = - q""" + def buildTree( + tpe: Type, + jsonName: String, + value: TermName, + isInitialized: TermName + ): Res => Res = { case (processed, possiblyNotInitialized, trees) => + extractDefaultValue(tpe) match { + case Some(defaultValue) => + val tree = + q""" if(!$isInitialized) { $value = $defaultValue $isInitialized = true } """ - (value :: processed, possiblyNotInitialized, tree :: trees) - - case None => - (value :: processed, (q"!$isInitialized", jsonName) :: possiblyNotInitialized, trees) - } + (value :: processed, possiblyNotInitialized, tree :: trees) + + case None => + ( + value :: processed, + (q"!$isInitialized", jsonName) :: possiblyNotInitialized, + trees + ) + } } - - val (_, possiblyNotInitialized, defaultValues) = readerFields.foldLeft((List[TermName](), List[(Tree, String)](), List[Tree]())) { + val (_, possiblyNotInitialized, defaultValues) = readerFields.foldLeft( + (List[TermName](), List[(Tree, String)](), List[Tree]()) + ) { case (res, f: SimpleField) => buildTree(f.tpe, f.jsonName, f.value, f.isInitialized)(res) case (tuple, f: ExtractedField) => f.args.foldLeft(tuple) { - case (res, FunctionArgument(Field.RawField(jsonName, tpe), value, isInitialized)) if !res._1.contains(value) => + case ( + res, + FunctionArgument( + Field.RawField(jsonName, tpe), + value, + isInitialized + ) + ) if !res._1.contains(value) => buildTree(tpe, jsonName, value, isInitialized)(res) case (res, _) => res @@ -423,7 +523,14 @@ trait ReaderDerivation case (tuple, f: FromExtractedReader) => f.args.foldLeft(tuple) { - case (res, FunctionArgument(Field.RawField(jsonName, tpe), value, isInitialized)) if !res._1.contains(value) => + case ( + res, + FunctionArgument( + Field.RawField(jsonName, tpe), + value, + isInitialized + ) + ) if !res._1.contains(value) => buildTree(tpe, jsonName, value, isInitialized)(res) case (res, _) => res @@ -437,12 +544,12 @@ trait ReaderDerivation case Nil => q"..${defaultValues.reverse}" - case xs@(headNotInit, _) :: tail => + case xs @ (headNotInit, _) :: tail => val uninitializedFields = TermName(c.freshName("uninitializedFields")) - val predicate = tail.foldLeft[Tree](q"$headNotInit")((a, b) => q"$a || ${b._1}") - val fields = xs.map { - case (notInit, name) => - q""" + val predicate = + tail.foldLeft[Tree](q"$headNotInit")((a, b) => q"$a || ${b._1}") + val fields = xs.map { case (notInit, name) => + q""" if($notInit) { $uninitializedFields += $name } @@ -460,30 +567,46 @@ trait ReaderDerivation } } - private def allocateTransformationsLoop(readerFields: List[ReaderField]): Tree = { - val (_, possiblyNotInitializedFields, defaults, loopActions) = readerFields.foldLeft((List[TermName](), List[(Tree, String)](), List[Tree](), List[Tree]())) { - case ((processed, possiblyNotInitialized, defaultTrees, loopTrees), field) => - def buildTransformation(name: String, - tpe: Type, - args: List[FunctionArgument], - value: TermName, - isInitialized: TermName, - tempIterator: Option[TermName])(valueAction: Tree) = { - val start = tempIterator match { - case Some(iter) => - q"!$isInitialized && $iter != null" - case None => - q"!$isInitialized" - } - val canProcess = args.foldLeft[Tree](start) { - case (current, FunctionArgument(_: Field.ClassField, _, argIsInitialized)) => - q"$current && $argIsInitialized" - case (current, _) => //RawField already checked in allocateRawFieldsPostProcessing - current - } + private def allocateTransformationsLoop( + readerFields: List[ReaderField] + ): Tree = { + val (_, possiblyNotInitializedFields, defaults, loopActions) = + readerFields.foldLeft( + (List[TermName](), List[(Tree, String)](), List[Tree](), List[Tree]()) + ) { + case ( + (processed, possiblyNotInitialized, defaultTrees, loopTrees), + field + ) => + def buildTransformation( + name: String, + tpe: Type, + args: List[FunctionArgument], + value: TermName, + isInitialized: TermName, + tempIterator: Option[TermName] + )(valueAction: Tree) = { + val start = tempIterator match { + case Some(iter) => + q"!$isInitialized && $iter != null" + case None => + q"!$isInitialized" + } + val canProcess = args.foldLeft[Tree](start) { + case ( + current, + FunctionArgument(_: Field.ClassField, _, argIsInitialized) + ) => + q"$current && $argIsInitialized" + case ( + current, + _ + ) => // RawField already checked in allocateRawFieldsPostProcessing + current + } - val loopAction = - q""" + val loopAction = + q""" if($canProcess) { $value = $valueAction $isInitialized = true @@ -491,42 +614,77 @@ trait ReaderDerivation } """ - extractDefaultValue(tpe) match { - case Some(defaultValue) => - val tree = - q""" + extractDefaultValue(tpe) match { + case Some(defaultValue) => + val tree = + q""" if(!$isInitialized) { $value = $defaultValue $isInitialized = true } """ - (value :: processed, possiblyNotInitialized, tree :: defaultTrees, loopAction :: loopTrees) - - case None => - (value :: processed, (q"!$isInitialized", name) :: possiblyNotInitialized, defaultTrees, loopAction :: loopTrees) + ( + value :: processed, + possiblyNotInitialized, + tree :: defaultTrees, + loopAction :: loopTrees + ) + + case None => + ( + value :: processed, + (q"!$isInitialized", name) :: possiblyNotInitialized, + defaultTrees, + loopAction :: loopTrees + ) + } } - } - field match { - case ExtractedField(name, tpe, functionName, args, _, value, isInitialized) => - buildTransformation(name, tpe, args, value, isInitialized, None) { - q""" + field match { + case ExtractedField( + name, + tpe, + functionName, + args, + _, + value, + isInitialized + ) => + buildTransformation(name, tpe, args, value, isInitialized, None) { + q""" $functionName.apply(..${args.map(_.value)}) """ - } + } - case FromExtractedReader(name, tpe, _, functionName, args, _, value, isInitialized, tempIterator) => - buildTransformation(name, tpe, args, value, isInitialized, Some(tempIterator)) { - q""" + case FromExtractedReader( + name, + tpe, + _, + functionName, + args, + _, + value, + isInitialized, + tempIterator + ) => + buildTransformation( + name, + tpe, + args, + value, + isInitialized, + Some(tempIterator) + ) { + q""" implicit val $fieldNameTerm: $fieldNameType = $fieldNameTmp.appendFieldName($name) $functionName.apply(..${args.map(_.value)}).read($tempIterator) """ - } + } - case _ => - (processed, possiblyNotInitialized, defaultTrees, loopTrees) - } - } + case _ => + (processed, possiblyNotInitialized, defaultTrees, loopTrees) + } + } val loop = q""" @@ -544,12 +702,12 @@ trait ReaderDerivation ..${defaults.reverse} """ - case xs@(headNotInit, _) :: tail => + case xs @ (headNotInit, _) :: tail => val uninitializedFields = TermName(c.freshName("uninitializedFields")) - val predicate = tail.foldLeft[Tree](q"$headNotInit")((a, b) => q"$a || ${b._1}") - val fields = xs.map { - case (notInit, name) => - q""" + val predicate = + tail.foldLeft[Tree](q"$headNotInit")((a, b) => q"$a || ${b._1}") + val fields = xs.map { case (notInit, name) => + q""" if($notInit) { $uninitializedFields += $name } @@ -571,14 +729,20 @@ trait ReaderDerivation private def extractDefaultValue(tpe: Type): Option[Tree] = { c.typecheck(q"implicitly[$jsonReaderDefaultValueType[$tpe]]") match { case q"$_.implicitly[$_]($defaultValue)" => - val mbValue = defaultValue.tpe.typeSymbol.annotations.map(_.tree).collectFirst { - case q"new $clazz(${value: Tree})" if clazz.tpe =:= typeOf[JsonReaderDefaultValue.ReaderDefaultValue] => - value - } + val mbValue = + defaultValue.tpe.typeSymbol.annotations.map(_.tree).collectFirst { + case q"new $clazz(${value: Tree})" + if clazz.tpe =:= typeOf[ + JsonReaderDefaultValue.ReaderDefaultValue + ] => + value + } mbValue match { case None => - abort(s"JsonReaderDefaultValue '${defaultValue.tpe}' is not annotated with 'ReaderDefaultValue'") + abort( + s"JsonReaderDefaultValue '${defaultValue.tpe}' is not annotated with 'ReaderDefaultValue'" + ) case Some(q"null") => None case Some(value) => diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala index bf08b8d5..343f9e38 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala @@ -7,9 +7,9 @@ import tethys.{JsonObjectWriter, JsonReader} import scala.reflect.macros.blackbox class SemiautoDerivationMacro(val c: blackbox.Context) - extends WriterDerivation - with ReaderDerivation - with WriterBuilderCommons { + extends WriterDerivation + with ReaderDerivation + with WriterBuilderCommons { import c.universe._ @@ -25,12 +25,18 @@ class SemiautoDerivationMacro(val c: blackbox.Context) } } - def jsonWriterWithBuilder[A: WeakTypeTag](builder: Expr[WriterBuilder[A]]): Expr[JsonObjectWriter[A]] = { + def jsonWriterWithBuilder[A: WeakTypeTag]( + builder: Expr[WriterBuilder[A]] + ): Expr[JsonObjectWriter[A]] = { val description = convertWriterBuilder[A](builder) - describedJsonWriter[A](c.Expr[WriterDescription[A]](c.typecheck(description.tree))) + describedJsonWriter[A]( + c.Expr[WriterDescription[A]](c.typecheck(description.tree)) + ) } - def jsonWriterWithConfig[A: WeakTypeTag](config: Expr[WriterDerivationConfig]): Expr[JsonObjectWriter[A]] = { + def jsonWriterWithConfig[A: WeakTypeTag]( + config: Expr[WriterDerivationConfig] + ): Expr[JsonObjectWriter[A]] = { val tpe = weakTypeOf[A] val clazz = classSym(tpe) @@ -43,13 +49,17 @@ class SemiautoDerivationMacro(val c: blackbox.Context) ) ) } else if (clazz.isSealed) { - deriveWriterForSealedClass[A](c.Expr[WriterDerivationConfig](c.untypecheck(config.tree))) + deriveWriterForSealedClass[A]( + c.Expr[WriterDerivationConfig](c.untypecheck(config.tree)) + ) } else { abort(s"Can't auto derive JsonWriter[$tpe]") } } - def describedJsonWriter[A: WeakTypeTag](description: Expr[WriterDescription[A]]): Expr[JsonObjectWriter[A]] = { + def describedJsonWriter[A: WeakTypeTag]( + description: Expr[WriterDescription[A]] + ): Expr[JsonObjectWriter[A]] = { val tpe = weakTypeOf[A] if (!isCaseClass(tpe)) { abort(s"Can't auto derive JsonWriter[$tpe]") @@ -67,12 +77,18 @@ class SemiautoDerivationMacro(val c: blackbox.Context) } } - def jsonReaderWithBuilder[A: WeakTypeTag](builder: Expr[ReaderBuilder[A]]): Expr[JsonReader[A]] = { + def jsonReaderWithBuilder[A: WeakTypeTag]( + builder: Expr[ReaderBuilder[A]] + ): Expr[JsonReader[A]] = { val description = convertReaderBuilder[A](builder) - describedJsonReader[A](c.Expr[ReaderDescription[A]](c.typecheck(description.tree))) + describedJsonReader[A]( + c.Expr[ReaderDescription[A]](c.typecheck(description.tree)) + ) } - def describedJsonReader[A: WeakTypeTag](description: Expr[ReaderDescription[A]]): Expr[JsonReader[A]] = { + def describedJsonReader[A: WeakTypeTag]( + description: Expr[ReaderDescription[A]] + ): Expr[JsonReader[A]] = { val tpe = weakTypeOf[A] if (isCaseClass(tpe)) { deriveReader[A](unliftReaderMacroDescription(description)) @@ -81,29 +97,35 @@ class SemiautoDerivationMacro(val c: blackbox.Context) } } - def jsonReaderWithConfig[A: WeakTypeTag](config: Expr[ReaderDerivationConfig]): Expr[JsonReader[A]] = { + def jsonReaderWithConfig[A: WeakTypeTag]( + config: Expr[ReaderDerivationConfig] + ): Expr[JsonReader[A]] = { val tpe = weakTypeOf[A] if (isCaseClass(tpe)) { - deriveReader[A](ReaderMacroDescription( - config = c.Expr[ReaderDerivationConfig](c.untypecheck(config.tree)), - operations = Seq() - )) + deriveReader[A]( + ReaderMacroDescription( + config = c.Expr[ReaderDerivationConfig](c.untypecheck(config.tree)), + operations = Seq() + ) + ) } else { fail(s"Can't auto derive JsonReader[$tpe]") } } - private def unliftWriterMacroDescription[A: WeakTypeTag](description: Expr[WriterDescription[A]]): MacroWriteDescription = { + private def unliftWriterMacroDescription[A: WeakTypeTag]( + description: Expr[WriterDescription[A]] + ): MacroWriteDescription = { description.tree match { case Untyped(q"${description: MacroWriteDescription}") => description } } - private def unliftReaderMacroDescription[A: WeakTypeTag](description: Expr[ReaderDescription[A]]): ReaderMacroDescription = { + private def unliftReaderMacroDescription[A: WeakTypeTag]( + description: Expr[ReaderDescription[A]] + ): ReaderMacroDescription = { description.tree match { case Untyped(q"${description: ReaderMacroDescription}") => description } } } - - diff --git a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/WriterDerivation.scala b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/WriterDerivation.scala index 0ad4279d..4efc711d 100644 --- a/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/WriterDerivation.scala +++ b/modules/macro-derivation/src/main/scala-2.13+/tethys/derivation/impl/derivation/WriterDerivation.scala @@ -10,7 +10,7 @@ import scala.annotation.tailrec import scala.reflect.macros.blackbox trait WriterDerivation - extends WriterBuilderCommons + extends WriterBuilderCommons with CaseClassUtils with BaseMacroDefinitions with DerivationUtils { @@ -37,27 +37,27 @@ trait WriterDerivation deriveWriterForSealedClass[A](emptyWriterConfig) } - def deriveWriterForSealedClass[A: WeakTypeTag](config: c.Expr[WriterDerivationConfig]): Expr[JsonObjectWriter[A]] = { + def deriveWriterForSealedClass[A: WeakTypeTag]( + config: c.Expr[WriterDerivationConfig] + ): Expr[JsonObjectWriter[A]] = { val tpe = weakTypeOf[A] val types = collectDistinctSubtypes(tpe).sortBy(_.typeSymbol.fullName) - if(types.isEmpty) fail(s"${tpe.typeSymbol} has no known direct subclass") + if (types.isEmpty) fail(s"${tpe.typeSymbol} has no known direct subclass") else { val terms = types.map(_ => TermName(c.freshName())) - val writers = types.zip(terms).map { - case (subtype, term) => - q"private[this] lazy val $term = implicitly[$jsonObjectWriterType[$subtype]]" + val writers = types.zip(terms).map { case (subtype, term) => + q"private[this] lazy val $term = implicitly[$jsonObjectWriterType[$subtype]]" } - val subClassesCases = types.zip(terms).map { - case (subtype, writer) => - val term = TermName(c.freshName("sub")) - val discriminatorTerm = TermName(c.freshName("discriminator")) - val typeName = subtype.typeSymbol.asClass.name.decodedName.toString.trim - cq"""$term: $subtype => { + val subClassesCases = types.zip(terms).map { case (subtype, writer) => + val term = TermName(c.freshName("sub")) + val discriminatorTerm = TermName(c.freshName("discriminator")) + val typeName = subtype.typeSymbol.asClass.name.decodedName.toString.trim + cq"""$term: $subtype => { $writer.writeValues($term, $tokenWriterTerm) ${config.tree}.discriminator.foreach { $discriminatorTerm: String => implicitly[$jsonWriterType[String]].write($discriminatorTerm, $typeName, $tokenWriterTerm) @@ -83,12 +83,16 @@ trait WriterDerivation } } - def deriveWriter[A: WeakTypeTag](description: MacroWriteDescription): Expr[JsonObjectWriter[A]] = { + def deriveWriter[A: WeakTypeTag]( + description: MacroWriteDescription + ): Expr[JsonObjectWriter[A]] = { val tpe = description.tpe - val config = scala.util.Try(c.eval(description.config)).getOrElse(c.eval(description.config)) + val config = scala.util + .Try(c.eval(description.config)) + .getOrElse(c.eval(description.config)) val writerFields = applyFieldStyle(config.fieldStyle) - .andThen(applyDescriptionOperations(description.operations)) - .apply(makeFields[A]) + .andThen(applyDescriptionOperations(description.operations)) + .apply(makeFields[A]) val (typeWriters, writerTrees) = allocateWriters(writerFields) val functions = allocateFunctions(writerFields) @@ -112,11 +116,14 @@ trait WriterDerivation q"$name.apply($tree)" } - val resultCases = cases.map { - case CaseDef(d, g, body) => - val fieldTpe = unwrapType(body.tpe.finalResultType) - val writerTerm = typeWriters.find(_._1 =:= fieldTpe).get._2 - CaseDef(d, g, q"$writerTerm.write(${jsonName.tree}, $body, $tokenWriterTerm)") + val resultCases = cases.map { case CaseDef(d, g, body) => + val fieldTpe = unwrapType(body.tpe.finalResultType) + val writerTerm = typeWriters.find(_._1 =:= fieldTpe).get._2 + CaseDef( + d, + g, + q"$writerTerm.write(${jsonName.tree}, $body, $tokenWriterTerm)" + ) } q"$valueTree match { case ..$resultCases }" @@ -143,13 +150,29 @@ trait WriterDerivation sealed trait Extractor case class InlineExtract(tree: Tree) extends Extractor - case class FunctionExtractor(name: TermName, arg: InlineExtract, from: Type, to: Type, body: Tree) extends Extractor + case class FunctionExtractor( + name: TermName, + arg: InlineExtract, + from: Type, + to: Type, + body: Tree + ) extends Extractor private sealed trait WriterField { def name: String } - private case class SimpleWriterField(name: String, jsonName: Expr[String], tpe: Type, extractor: Extractor) extends WriterField - private case class PartialExtractedField(name: String, jsonName: Expr[String], argExtractor: Extractor, cases: List[CaseDef]) extends WriterField + private case class SimpleWriterField( + name: String, + jsonName: Expr[String], + tpe: Type, + extractor: Extractor + ) extends WriterField + private case class PartialExtractedField( + name: String, + jsonName: Expr[String], + argExtractor: Extractor, + cases: List[CaseDef] + ) extends WriterField private def makeFields[A: WeakTypeTag]: List[WriterField] = { val classDef = caseClassDefinition[A] @@ -163,31 +186,40 @@ trait WriterDerivation } } - private def applyFieldStyle(fieldStyle: Option[FieldStyle]): List[WriterField] => List[WriterField] = writerFields => { + private def applyFieldStyle( + fieldStyle: Option[FieldStyle] + ): List[WriterField] => List[WriterField] = writerFields => { fieldStyle.fold(writerFields) { style => writerFields.map { - case field: SimpleWriterField => field.copy(jsonName = c.Expr[String](q"${style.applyStyle(field.name)}")) + case field: SimpleWriterField => + field.copy(jsonName = + c.Expr[String](q"${style.applyStyle(field.name)}") + ) case field => field } } } - private def applyDescriptionOperations(operations: Seq[BuilderMacroOperation]): List[WriterField] => List[WriterField] = writerFields => { - def mapField(fields: List[WriterField], name: String)(f: SimpleWriterField => WriterField): List[WriterField] = { + private def applyDescriptionOperations( + operations: Seq[BuilderMacroOperation] + ): List[WriterField] => List[WriterField] = writerFields => { + def mapField(fields: List[WriterField], name: String)( + f: SimpleWriterField => WriterField + ): List[WriterField] = { fields.map { case field: SimpleWriterField if field.name == name => f(field) - case field => field + case field => field } } - operations.foldLeft(writerFields) { - case (fields, operation) => - operation match { - case BuilderMacroOperation.Remove(_, field) => - fields.filterNot(_.name == field) + operations.foldLeft(writerFields) { case (fields, operation) => + operation match { + case BuilderMacroOperation.Remove(_, field) => + fields.filterNot(_.name == field) - case BuilderMacroOperation.Update(_, field, name, fun, from, to) => - mapField(fields, field)(f => SimpleWriterField( + case BuilderMacroOperation.Update(_, field, name, fun, from, to) => + mapField(fields, field)(f => + SimpleWriterField( name = field, jsonName = name.getOrElse(f.jsonName), tpe = to, @@ -198,10 +230,12 @@ trait WriterDerivation to = to, body = fun ) - )) + ) + ) - case BuilderMacroOperation.UpdateFromRoot(tpe, field, name, fun, to) => - mapField(fields, field)(f => SimpleWriterField( + case BuilderMacroOperation.UpdateFromRoot(tpe, field, name, fun, to) => + mapField(fields, field)(f => + SimpleWriterField( name = field, jsonName = name.getOrElse(f.jsonName), tpe = to, @@ -212,30 +246,38 @@ trait WriterDerivation to = to, body = fun ) - )) + ) + ) - case BuilderMacroOperation.UpdatePartial(_, field, name, fun, from) => - mapField(fields, field)(f => PartialExtractedField( + case BuilderMacroOperation.UpdatePartial(_, field, name, fun, from) => + mapField(fields, field)(f => + PartialExtractedField( name = field, jsonName = name.getOrElse(f.jsonName), argExtractor = InlineExtract(q"$valueTerm.${TermName(field)}"), cases = fun match { - case q"{ case ..$cases }" => cases.asInstanceOf[Seq[CaseDef]].toList + case q"{ case ..$cases }" => + cases.asInstanceOf[Seq[CaseDef]].toList } - )) + ) + ) - case BuilderMacroOperation.UpdatePartialFromRoot(_, field, name, fun) => - mapField(fields, field)(f => PartialExtractedField( + case BuilderMacroOperation.UpdatePartialFromRoot(_, field, name, fun) => + mapField(fields, field)(f => + PartialExtractedField( name = field, jsonName = name.getOrElse(f.jsonName), argExtractor = InlineExtract(q"$valueTerm"), cases = fun match { - case q"{ case ..$cases }" => cases.asInstanceOf[Seq[CaseDef]].toList + case q"{ case ..$cases }" => + cases.asInstanceOf[Seq[CaseDef]].toList } - )) + ) + ) - case BuilderMacroOperation.Add(tpe, field, fun, to) => - fields ::: List(SimpleWriterField( + case BuilderMacroOperation.Add(tpe, field, fun, to) => + fields ::: List( + SimpleWriterField( name = "__---nope---__", jsonName = field, tpe = to, @@ -246,25 +288,31 @@ trait WriterDerivation to = to, body = fun ) - )) - } + ) + ) + } } } - private def allocateWriters(writerFields: List[WriterField]): (List[(Type, TermName)], List[Tree]) = { + private def allocateWriters( + writerFields: List[WriterField] + ): (List[(Type, TermName)], List[Tree]) = { val types = writerFields.flatMap { case SimpleWriterField(_, _, tpe, _) => List(tpe) - case PartialExtractedField(_, _, _, cases) => cases.map { - case CaseDef(_, _, body) => unwrapType(body.tpe.finalResultType) - } + case PartialExtractedField(_, _, _, cases) => + cases.map { case CaseDef(_, _, body) => + unwrapType(body.tpe.finalResultType) + } } types.foldLeft(List[(Type, TermName)](), List[Tree]()) { case ((terms, trees), tpe) if !terms.exists(_._1 =:= tpe) => val term = TermName(c.freshName()) val tree = { - if (tpe =:= typeOf[Nothing]) q"private[this] lazy val $term = $writersPack.EmptyWriters.emptyWriter[Nothing]" - else q"private[this] lazy val $term = implicitly[$jsonWriterType[$tpe]]" + if (tpe =:= typeOf[Nothing]) + q"private[this] lazy val $term = $writersPack.EmptyWriters.emptyWriter[Nothing]" + else + q"private[this] lazy val $term = implicitly[$jsonWriterType[$tpe]]" } ((tpe, term) :: terms, tree :: trees) @@ -274,9 +322,19 @@ trait WriterDerivation private def allocateFunctions(writerFields: List[WriterField]): List[Tree] = { writerFields.flatMap { - case SimpleWriterField(_, _, _, FunctionExtractor(name, _, from, to, body)) => + case SimpleWriterField( + _, + _, + _, + FunctionExtractor(name, _, from, to, body) + ) => q"private[this] val $name: $from => $to = $body" :: Nil - case PartialExtractedField(_, _, FunctionExtractor(name, _, from, to, body), _) => + case PartialExtractedField( + _, + _, + FunctionExtractor(name, _, from, to, body), + _ + ) => q"private[this] val $name: $from => $to = $body" :: Nil case _ => Nil @@ -295,6 +353,6 @@ trait WriterDerivation @tailrec private def unwrapType(tpe: Type): Type = tpe match { case ConstantType(const) => unwrapType(const.tpe) - case _ => tpe + case _ => tpe } } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/AutoDerivation.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/AutoDerivation.scala index 2ed3a138..c30e4249 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/AutoDerivation.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/AutoDerivation.scala @@ -7,17 +7,23 @@ import tethys.commons.LowPriorityInstance import tethys.derivation.impl.derivation.AutoDerivationMacro trait AutoDerivation { - implicit inline def jsonWriterMaterializer[T]: LowPriorityInstance[JsonObjectWriter[T]] = + implicit inline def jsonWriterMaterializer[T] + : LowPriorityInstance[JsonObjectWriter[T]] = ${ AutoDerivation.jsonWriterMaterializer[T] } - - implicit inline def jsonReaderMaterializer[T]: LowPriorityInstance[JsonReader[T]] = + + implicit inline def jsonReaderMaterializer[T] + : LowPriorityInstance[JsonReader[T]] = ${ AutoDerivation.jsonReaderMaterializer[T] } } private[this] object AutoDerivation { - def jsonWriterMaterializer[T: Type](using Quotes): Expr[LowPriorityInstance[JsonObjectWriter[T]]] = + def jsonWriterMaterializer[T: Type](using + Quotes + ): Expr[LowPriorityInstance[JsonObjectWriter[T]]] = new AutoDerivationMacro(quotes).simpleJsonWriter[T] - def jsonReaderMaterializer[T: Type](using Quotes): Expr[LowPriorityInstance[JsonReader[T]]] = + def jsonReaderMaterializer[T: Type](using + Quotes + ): Expr[LowPriorityInstance[JsonReader[T]]] = new AutoDerivationMacro(quotes).simpleJsonReader[T] -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/SemiautoDerivation.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/SemiautoDerivation.scala index d14d6e27..24cb08a4 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/SemiautoDerivation.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/SemiautoDerivation.scala @@ -11,7 +11,10 @@ import tethys.derivation.builder.{ WriterDerivationConfig, WriterDescription } -import tethys.derivation.impl.builder.{ReaderDescriptionMacro, WriterDescriptionMacro} +import tethys.derivation.impl.builder.{ + ReaderDescriptionMacro, + WriterDescriptionMacro +} import tethys.derivation.impl.derivation.SemiautoDerivationMacro import scala.quoted.* import scala.annotation.compileTimeOnly @@ -20,31 +23,47 @@ trait SemiautoDerivation { inline def jsonWriter[T]: JsonObjectWriter[T] = ${ SemiautoDerivation.jsonWriter[T] } - inline def jsonWriter[T](inline description: WriterDescription[T]): JsonObjectWriter[T] = + inline def jsonWriter[T]( + inline description: WriterDescription[T] + ): JsonObjectWriter[T] = ${ SemiautoDerivation.jsonWriterWithDescription[T]('description) } - inline def jsonWriter[T <: Product](inline builder: => WriterBuilder[T]): JsonObjectWriter[T] = + inline def jsonWriter[T <: Product]( + inline builder: => WriterBuilder[T] + ): JsonObjectWriter[T] = ${ SemiautoDerivation.jsonWriterWithBuilder[T]('builder) } - inline def jsonWriter[T](inline config: WriterDerivationConfig): JsonObjectWriter[T] = + inline def jsonWriter[T]( + inline config: WriterDerivationConfig + ): JsonObjectWriter[T] = ${ SemiautoDerivation.jsonWriterWithConfig[T]('config) } - inline def describe[T <: Product](inline builder: => WriterBuilder[T]): WriterDescription[T] = + inline def describe[T <: Product]( + inline builder: => WriterBuilder[T] + ): WriterDescription[T] = ${ SemiautoDerivation.describeWriter[T]('builder) } inline def jsonReader[T]: JsonReader[T] = ${ SemiautoDerivation.jsonReader[T] } - inline def jsonReader[T](inline description: ReaderDescription[T]): JsonReader[T] = + inline def jsonReader[T]( + inline description: ReaderDescription[T] + ): JsonReader[T] = ${ SemiautoDerivation.jsonReaderWithDescription[T]('description) } - inline def jsonReader[T](inline config: ReaderDerivationConfig): JsonReader[T] = + inline def jsonReader[T]( + inline config: ReaderDerivationConfig + ): JsonReader[T] = ${ SemiautoDerivation.jsonReaderWithConfig[T]('config) } - inline def jsonReader[T <: Product](inline builder: => ReaderBuilder[T]): JsonReader[T] = + inline def jsonReader[T <: Product]( + inline builder: => ReaderBuilder[T] + ): JsonReader[T] = ${ SemiautoDerivation.jsonReaderWithBuilder[T]('builder) } - inline def describe[T <: Product](inline builder: => ReaderBuilder[T]): ReaderDescription[T] = + inline def describe[T <: Product]( + inline builder: => ReaderBuilder[T] + ): ReaderDescription[T] = ${ SemiautoDerivation.describeReader[T]('builder) } implicit class ReaderFieldStringOps(val s: String) { @@ -62,34 +81,52 @@ private[this] object SemiautoDerivation { def jsonWriter[T: Type](using Quotes): Expr[JsonObjectWriter[T]] = new SemiautoDerivationMacro(quotes).simpleJsonWriter[T] - def jsonWriterWithConfig[T: Type](config: Expr[WriterDerivationConfig])(using Quotes): Expr[JsonObjectWriter[T]] = + def jsonWriterWithConfig[T: Type](config: Expr[WriterDerivationConfig])(using + Quotes + ): Expr[JsonObjectWriter[T]] = new SemiautoDerivationMacro(quotes).jsonWriterWithConfig[T](config) - def jsonWriterWithDescription[T: Type](description: Expr[WriterDescription[T]])(using + def jsonWriterWithDescription[T: Type]( + description: Expr[WriterDescription[T]] + )(using Quotes ): Expr[JsonObjectWriter[T]] = - new SemiautoDerivationMacro(quotes).jsonWriterWithWriterDescription[T](description) + new SemiautoDerivationMacro(quotes) + .jsonWriterWithWriterDescription[T](description) - def jsonWriterWithBuilder[T <: Product: Type](builder: Expr[WriterBuilder[T]])(using + def jsonWriterWithBuilder[T <: Product: Type]( + builder: Expr[WriterBuilder[T]] + )(using Quotes ): Expr[JsonObjectWriter[T]] = new SemiautoDerivationMacro(quotes).jsonWriterWithBuilder[T](builder) - def describeWriter[T <: Product: Type](builder: Expr[WriterBuilder[T]])(using Quotes): Expr[WriterDescription[T]] = + def describeWriter[T <: Product: Type](builder: Expr[WriterBuilder[T]])(using + Quotes + ): Expr[WriterDescription[T]] = new WriterDescriptionMacro(quotes).simpleDescription[T](builder) def jsonReader[T: Type](using Quotes): Expr[JsonReader[T]] = new SemiautoDerivationMacro(quotes).simpleJsonReader[T] - def jsonReaderWithConfig[T: Type](config: Expr[ReaderDerivationConfig])(using Quotes): Expr[JsonReader[T]] = + def jsonReaderWithConfig[T: Type](config: Expr[ReaderDerivationConfig])(using + Quotes + ): Expr[JsonReader[T]] = new SemiautoDerivationMacro(quotes).jsonReaderWithConfig[T](config) - def jsonReaderWithDescription[T: Type](description: Expr[ReaderDescription[T]])(using Quotes): Expr[JsonReader[T]] = - new SemiautoDerivationMacro(quotes).jsonReaderWithReaderDescription[T](description) + def jsonReaderWithDescription[T: Type]( + description: Expr[ReaderDescription[T]] + )(using Quotes): Expr[JsonReader[T]] = + new SemiautoDerivationMacro(quotes) + .jsonReaderWithReaderDescription[T](description) - def jsonReaderWithBuilder[T <: Product: Type](builder: Expr[ReaderBuilder[T]])(using Quotes): Expr[JsonReader[T]] = + def jsonReaderWithBuilder[T <: Product: Type]( + builder: Expr[ReaderBuilder[T]] + )(using Quotes): Expr[JsonReader[T]] = new SemiautoDerivationMacro(quotes).jsonReaderWithBuilder[T](builder) - def describeReader[T <: Product: Type](builder: Expr[ReaderBuilder[T]])(using Quotes): Expr[ReaderDescription[T]] = + def describeReader[T <: Product: Type](builder: Expr[ReaderBuilder[T]])(using + Quotes + ): Expr[ReaderDescription[T]] = new ReaderDescriptionMacro(quotes).simpleDescription[T](builder) } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/DependentField.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/DependentField.scala index e02f6707..1a89b04e 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/DependentField.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/DependentField.scala @@ -9,729 +9,14533 @@ sealed trait DependentField0[A, B] { def from[T1](f1: (A) => T1): DependentField1[A, B, T1] def from[T1, T2](f1: (A) => T1, f2: (A) => T2): DependentField2[A, B, T1, T2] - def from[T1, T2, T3](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3): DependentField3[A, B, T1, T2, T3] - def from[T1, T2, T3, T4](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4): DependentField4[A, B, T1, T2, T3, T4] - def from[T1, T2, T3, T4, T5](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5[A, B, T1, T2, T3, T4, T5] - def from[T1, T2, T3, T4, T5, T6](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6[A, B, T1, T2, T3, T4, T5, T6] - def from[T1, T2, T3, T4, T5, T6, T7](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - def from[T1, T2, T3, T4, T5, T6, T7, T8](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f1: (A) => T1, f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def from[T1, T2, T3]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3 + ): DependentField3[A, B, T1, T2, T3] + def from[T1, T2, T3, T4]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4 + ): DependentField4[A, B, T1, T2, T3, T4] + def from[T1, T2, T3, T4, T5]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5 + ): DependentField5[A, B, T1, T2, T3, T4, T5] + def from[T1, T2, T3, T4, T5, T6]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6[A, B, T1, T2, T3, T4, T5, T6] + def from[T1, T2, T3, T4, T5, T6, T7]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] + def from[T1, T2, T3, T4, T5, T6, T7, T8]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f1: (A) => T1, + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def from[T1](f1: ReaderField[T1]): DependentField1[A, B, T1] - def from[T1, T2](f1: ReaderField[T1], f2: ReaderField[T2]): DependentField2[A, B, T1, T2] - def from[T1, T2, T3](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3]): DependentField3[A, B, T1, T2, T3] - def from[T1, T2, T3, T4](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4[A, B, T1, T2, T3, T4] - def from[T1, T2, T3, T4, T5](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5[A, B, T1, T2, T3, T4, T5] - def from[T1, T2, T3, T4, T5, T6](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6[A, B, T1, T2, T3, T4, T5, T6] - def from[T1, T2, T3, T4, T5, T6, T7](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - def from[T1, T2, T3, T4, T5, T6, T7, T8](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f1: ReaderField[T1], f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def from[T1, T2]( + f1: ReaderField[T1], + f2: ReaderField[T2] + ): DependentField2[A, B, T1, T2] + def from[T1, T2, T3]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3] + ): DependentField3[A, B, T1, T2, T3] + def from[T1, T2, T3, T4]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4] + ): DependentField4[A, B, T1, T2, T3, T4] + def from[T1, T2, T3, T4, T5]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5] + ): DependentField5[A, B, T1, T2, T3, T4, T5] + def from[T1, T2, T3, T4, T5, T6]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6[A, B, T1, T2, T3, T4, T5, T6] + def from[T1, T2, T3, T4, T5, T6, T7]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] + def from[T1, T2, T3, T4, T5, T6, T7, T8]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def from[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def from[ + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f1: ReaderField[T1], + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField1F[A, B, T1] { def apply(fun: (T1) => B): ReaderBuilder[A] } -sealed trait DependentField1[A, B, T1] - extends DependentField1F[A, B, T1] { +sealed trait DependentField1[A, B, T1] extends DependentField1F[A, B, T1] { def and[T2](f2: (A) => T2): DependentField2F[A, B, T1, T2] - def and[T2, T3](f2: (A) => T2, f3: (A) => T3): DependentField3F[A, B, T1, T2, T3] - def and[T2, T3, T4](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T2, T3, T4, T5](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T2, T3, T4, T5, T6](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T2, T3, T4, T5, T6, T7](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T2, T3, T4, T5, T6, T7, T8](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T2, T3, T4, T5, T6, T7, T8, T9](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f2: (A) => T2, f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T2, T3]( + f2: (A) => T2, + f3: (A) => T3 + ): DependentField3F[A, B, T1, T2, T3] + def and[T2, T3, T4]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4 + ): DependentField4F[A, B, T1, T2, T3, T4] + def and[T2, T3, T4, T5]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5 + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T2, T3, T4, T5, T6]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T2, T3, T4, T5, T6, T7]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T2, T3, T4, T5, T6, T7, T8]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T2, T3, T4, T5, T6, T7, T8, T9]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f2: (A) => T2, + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def and[T2](f2: ReaderField[T2]): DependentField2F[A, B, T1, T2] - def and[T2, T3](f2: ReaderField[T2], f3: ReaderField[T3]): DependentField3F[A, B, T1, T2, T3] - def and[T2, T3, T4](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T2, T3, T4, T5](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T2, T3, T4, T5, T6](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T2, T3, T4, T5, T6, T7](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T2, T3, T4, T5, T6, T7, T8](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T2, T3, T4, T5, T6, T7, T8, T9](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f2: ReaderField[T2], f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T2, T3]( + f2: ReaderField[T2], + f3: ReaderField[T3] + ): DependentField3F[A, B, T1, T2, T3] + def and[T2, T3, T4]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4] + ): DependentField4F[A, B, T1, T2, T3, T4] + def and[T2, T3, T4, T5]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5] + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T2, T3, T4, T5, T6]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T2, T3, T4, T5, T6, T7]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T2, T3, T4, T5, T6, T7, T8]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T2, T3, T4, T5, T6, T7, T8, T9]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f2: ReaderField[T2], + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField2F[A, B, T1, T2] { def apply(fun: (T1, T2) => B): ReaderBuilder[A] } sealed trait DependentField2[A, B, T1, T2] - extends DependentField2F[A, B, T1, T2] { + extends DependentField2F[A, B, T1, T2] { def and[T3](f3: (A) => T3): DependentField3F[A, B, T1, T2, T3] - def and[T3, T4](f3: (A) => T3, f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T3, T4, T5](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T3, T4, T5, T6](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T3, T4, T5, T6, T7](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T3, T4, T5, T6, T7, T8](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T3, T4, T5, T6, T7, T8, T9](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T3, T4, T5, T6, T7, T8, T9, T10](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f3: (A) => T3, f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T3, T4]( + f3: (A) => T3, + f4: (A) => T4 + ): DependentField4F[A, B, T1, T2, T3, T4] + def and[T3, T4, T5]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5 + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T3, T4, T5, T6]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T3, T4, T5, T6, T7]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T3, T4, T5, T6, T7, T8]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T3, T4, T5, T6, T7, T8, T9]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T3, T4, T5, T6, T7, T8, T9, T10]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f3: (A) => T3, + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def and[T3](f3: ReaderField[T3]): DependentField3F[A, B, T1, T2, T3] - def and[T3, T4](f3: ReaderField[T3], f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T3, T4, T5](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T3, T4, T5, T6](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T3, T4, T5, T6, T7](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T3, T4, T5, T6, T7, T8](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T3, T4, T5, T6, T7, T8, T9](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T3, T4, T5, T6, T7, T8, T9, T10](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f3: ReaderField[T3], f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T3, T4]( + f3: ReaderField[T3], + f4: ReaderField[T4] + ): DependentField4F[A, B, T1, T2, T3, T4] + def and[T3, T4, T5]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5] + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T3, T4, T5, T6]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T3, T4, T5, T6, T7]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T3, T4, T5, T6, T7, T8]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T3, T4, T5, T6, T7, T8, T9]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T3, T4, T5, T6, T7, T8, T9, T10]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f3: ReaderField[T3], + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField3F[A, B, T1, T2, T3] { def apply(fun: (T1, T2, T3) => B): ReaderBuilder[A] } sealed trait DependentField3[A, B, T1, T2, T3] - extends DependentField3F[A, B, T1, T2, T3] { + extends DependentField3F[A, B, T1, T2, T3] { def and[T4](f4: (A) => T4): DependentField4F[A, B, T1, T2, T3, T4] - def and[T4, T5](f4: (A) => T4, f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T4, T5, T6](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T4, T5, T6, T7](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T4, T5, T6, T7, T8](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T4, T5, T6, T7, T8, T9](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T4, T5, T6, T7, T8, T9, T10](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T4, T5, T6, T7, T8, T9, T10, T11](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f4: (A) => T4, f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T4, T5]( + f4: (A) => T4, + f5: (A) => T5 + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T4, T5, T6]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T4, T5, T6, T7]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T4, T5, T6, T7, T8]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T4, T5, T6, T7, T8, T9]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T4, T5, T6, T7, T8, T9, T10]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T4, T5, T6, T7, T8, T9, T10, T11]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f4: (A) => T4, + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def and[T4](f4: ReaderField[T4]): DependentField4F[A, B, T1, T2, T3, T4] - def and[T4, T5](f4: ReaderField[T4], f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T4, T5, T6](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T4, T5, T6, T7](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T4, T5, T6, T7, T8](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T4, T5, T6, T7, T8, T9](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T4, T5, T6, T7, T8, T9, T10](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T4, T5, T6, T7, T8, T9, T10, T11](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f4: ReaderField[T4], f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T4, T5]( + f4: ReaderField[T4], + f5: ReaderField[T5] + ): DependentField5F[A, B, T1, T2, T3, T4, T5] + def and[T4, T5, T6]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T4, T5, T6, T7]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T4, T5, T6, T7, T8]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T4, T5, T6, T7, T8, T9]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T4, T5, T6, T7, T8, T9, T10]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T4, T5, T6, T7, T8, T9, T10, T11]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f4: ReaderField[T4], + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField4F[A, B, T1, T2, T3, T4] { def apply(fun: (T1, T2, T3, T4) => B): ReaderBuilder[A] } sealed trait DependentField4[A, B, T1, T2, T3, T4] - extends DependentField4F[A, B, T1, T2, T3, T4] { + extends DependentField4F[A, B, T1, T2, T3, T4] { def and[T5](f5: (A) => T5): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T5, T6](f5: (A) => T5, f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T5, T6, T7](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T5, T6, T7, T8](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T5, T6, T7, T8, T9](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T5, T6, T7, T8, T9, T10](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T5, T6, T7, T8, T9, T10, T11](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T5, T6, T7, T8, T9, T10, T11, T12](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f5: (A) => T5, f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T5, T6]( + f5: (A) => T5, + f6: (A) => T6 + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T5, T6, T7]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T5, T6, T7, T8]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T5, T6, T7, T8, T9]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T5, T6, T7, T8, T9, T10]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T5, T6, T7, T8, T9, T10, T11]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T5, T6, T7, T8, T9, T10, T11, T12]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f5: (A) => T5, + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] def and[T5](f5: ReaderField[T5]): DependentField5F[A, B, T1, T2, T3, T4, T5] - def and[T5, T6](f5: ReaderField[T5], f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T5, T6, T7](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T5, T6, T7, T8](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T5, T6, T7, T8, T9](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T5, T6, T7, T8, T9, T10](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T5, T6, T7, T8, T9, T10, T11](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T5, T6, T7, T8, T9, T10, T11, T12](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f5: ReaderField[T5], f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T5, T6]( + f5: ReaderField[T5], + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T5, T6, T7]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T5, T6, T7, T8]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T5, T6, T7, T8, T9]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T5, T6, T7, T8, T9, T10]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T5, T6, T7, T8, T9, T10, T11]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T5, T6, T7, T8, T9, T10, T11, T12]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f5: ReaderField[T5], + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - sealed trait DependentField5F[A, B, T1, T2, T3, T4, T5] { def apply(fun: (T1, T2, T3, T4, T5) => B): ReaderBuilder[A] } sealed trait DependentField5[A, B, T1, T2, T3, T4, T5] - extends DependentField5F[A, B, T1, T2, T3, T4, T5] { + extends DependentField5F[A, B, T1, T2, T3, T4, T5] { def and[T6](f6: (A) => T6): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T6, T7](f6: (A) => T6, f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T6, T7, T8](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T6, T7, T8, T9](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T6, T7, T8, T9, T10](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T6, T7, T8, T9, T10, T11](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T6, T7, T8, T9, T10, T11, T12](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T6, T7, T8, T9, T10, T11, T12, T13](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f6: (A) => T6, f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T6](f6: ReaderField[T6]): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] - def and[T6, T7](f6: ReaderField[T6], f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T6, T7, T8](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T6, T7, T8, T9](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T6, T7, T8, T9, T10](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T6, T7, T8, T9, T10, T11](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T6, T7, T8, T9, T10, T11, T12](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T6, T7, T8, T9, T10, T11, T12, T13](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f6: ReaderField[T6], f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + def and[T6, T7]( + f6: (A) => T6, + f7: (A) => T7 + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T6, T7, T8]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T6, T7, T8, T9]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T6, T7, T8, T9, T10]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T6, T7, T8, T9, T10, T11]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T6, T7, T8, T9, T10, T11, T12]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T6, T7, T8, T9, T10, T11, T12, T13]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f6: (A) => T6, + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T6]( + f6: ReaderField[T6] + ): DependentField6F[A, B, T1, T2, T3, T4, T5, T6] + def and[T6, T7]( + f6: ReaderField[T6], + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T6, T7, T8]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T6, T7, T8, T9]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T6, T7, T8, T9, T10]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T6, T7, T8, T9, T10, T11]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T6, T7, T8, T9, T10, T11, T12]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T6, T7, T8, T9, T10, T11, T12, T13]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f6: ReaderField[T6], + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField6F[A, B, T1, T2, T3, T4, T5, T6] { def apply(fun: (T1, T2, T3, T4, T5, T6) => B): ReaderBuilder[A] } sealed trait DependentField6[A, B, T1, T2, T3, T4, T5, T6] - extends DependentField6F[A, B, T1, T2, T3, T4, T5, T6] { + extends DependentField6F[A, B, T1, T2, T3, T4, T5, T6] { def and[T7](f7: (A) => T7): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T7, T8](f7: (A) => T7, f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T7, T8, T9](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T7, T8, T9, T10](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T7, T8, T9, T10, T11](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T7, T8, T9, T10, T11, T12](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T7, T8, T9, T10, T11, T12, T13](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T7, T8, T9, T10, T11, T12, T13, T14](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f7: (A) => T7, f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T7](f7: ReaderField[T7]): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] - def and[T7, T8](f7: ReaderField[T7], f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T7, T8, T9](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T7, T8, T9, T10](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T7, T8, T9, T10, T11](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T7, T8, T9, T10, T11, T12](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T7, T8, T9, T10, T11, T12, T13](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T7, T8, T9, T10, T11, T12, T13, T14](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f7: ReaderField[T7], f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + def and[T7, T8]( + f7: (A) => T7, + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T7, T8, T9]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T7, T8, T9, T10]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T7, T8, T9, T10, T11]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T7, T8, T9, T10, T11, T12]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T7, T8, T9, T10, T11, T12, T13]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f7: (A) => T7, + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T7]( + f7: ReaderField[T7] + ): DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] + def and[T7, T8]( + f7: ReaderField[T7], + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T7, T8, T9]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T7, T8, T9, T10]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T7, T8, T9, T10, T11]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T7, T8, T9, T10, T11, T12]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T7, T8, T9, T10, T11, T12, T13]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[ + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f7: ReaderField[T7], + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] { def apply(fun: (T1, T2, T3, T4, T5, T6, T7) => B): ReaderBuilder[A] } sealed trait DependentField7[A, B, T1, T2, T3, T4, T5, T6, T7] - extends DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] { - def and[T8](f8: (A) => T8): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T8, T9](f8: (A) => T8, f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T8, T9, T10](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T8, T9, T10, T11](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T8, T9, T10, T11, T12](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T8, T9, T10, T11, T12, T13](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T8, T9, T10, T11, T12, T13, T14](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T8, T9, T10, T11, T12, T13, T14, T15](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f8: (A) => T8, f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T8](f8: ReaderField[T8]): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - def and[T8, T9](f8: ReaderField[T8], f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T8, T9, T10](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T8, T9, T10, T11](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T8, T9, T10, T11, T12](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T8, T9, T10, T11, T12, T13](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T8, T9, T10, T11, T12, T13, T14](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T8, T9, T10, T11, T12, T13, T14, T15](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f8: ReaderField[T8], f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + extends DependentField7F[A, B, T1, T2, T3, T4, T5, T6, T7] { + def and[T8]( + f8: (A) => T8 + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T8, T9]( + f8: (A) => T8, + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T8, T9, T10]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T8, T9, T10, T11]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T8, T9, T10, T11, T12]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T8, T9, T10, T11, T12, T13]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T8, T9, T10, T11, T12, T13, T14]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f8: (A) => T8, + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T8]( + f8: ReaderField[T8] + ): DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] + def and[T8, T9]( + f8: ReaderField[T8], + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T8, T9, T10]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T8, T9, T10, T11]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T8, T9, T10, T11, T12]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T8, T9, T10, T11, T12, T13]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T8, T9, T10, T11, T12, T13, T14]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[ + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ]( + f8: ReaderField[T8], + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] { def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8) => B): ReaderBuilder[A] } sealed trait DependentField8[A, B, T1, T2, T3, T4, T5, T6, T7, T8] - extends DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] { - def and[T9](f9: (A) => T9): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T9, T10](f9: (A) => T9, f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T9, T10, T11](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T9, T10, T11, T12](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T9, T10, T11, T12, T13](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T9, T10, T11, T12, T13, T14](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T9, T10, T11, T12, T13, T14, T15](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T9, T10, T11, T12, T13, T14, T15, T16](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f9: (A) => T9, f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T9](f9: ReaderField[T9]): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - def and[T9, T10](f9: ReaderField[T9], f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T9, T10, T11](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T9, T10, T11, T12](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T9, T10, T11, T12, T13](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T9, T10, T11, T12, T13, T14](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T9, T10, T11, T12, T13, T14, T15](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T9, T10, T11, T12, T13, T14, T15, T16](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f9: ReaderField[T9], f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + extends DependentField8F[A, B, T1, T2, T3, T4, T5, T6, T7, T8] { + def and[T9]( + f9: (A) => T9 + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T9, T10]( + f9: (A) => T9, + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T9, T10, T11]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T9, T10, T11, T12]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T9, T10, T11, T12, T13]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T9, T10, T11, T12, T13, T14]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T9, T10, T11, T12, T13, T14, T15]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f9: (A) => T9, + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T9]( + f9: ReaderField[T9] + ): DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] + def and[T9, T10]( + f9: ReaderField[T9], + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T9, T10, T11]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T9, T10, T11, T12]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T9, T10, T11, T12, T13]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T9, T10, T11, T12, T13, T14]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T9, T10, T11, T12, T13, T14, T15]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f9: ReaderField[T9], + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] { def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9) => B): ReaderBuilder[A] } sealed trait DependentField9[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] - extends DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] { - def and[T10](f10: (A) => T10): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T10, T11](f10: (A) => T10, f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T10, T11, T12](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T10, T11, T12, T13](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T10, T11, T12, T13, T14](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T10, T11, T12, T13, T14, T15](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T10, T11, T12, T13, T14, T15, T16](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T10, T11, T12, T13, T14, T15, T16, T17](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f10: (A) => T10, f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T10](f10: ReaderField[T10]): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - def and[T10, T11](f10: ReaderField[T10], f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T10, T11, T12](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T10, T11, T12, T13](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T10, T11, T12, T13, T14](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T10, T11, T12, T13, T14, T15](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T10, T11, T12, T13, T14, T15, T16](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T10, T11, T12, T13, T14, T15, T16, T17](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f10: ReaderField[T10], f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + extends DependentField9F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9] { + def and[T10]( + f10: (A) => T10 + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T10, T11]( + f10: (A) => T10, + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T10, T11, T12]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T10, T11, T12, T13]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T10, T11, T12, T13, T14]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T10, T11, T12, T13, T14, T15]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T10, T11, T12, T13, T14, T15, T16]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f10: (A) => T10, + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T10]( + f10: ReaderField[T10] + ): DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] + def and[T10, T11]( + f10: ReaderField[T10], + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T10, T11, T12]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T10, T11, T12, T13]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T10, T11, T12, T13, T14]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T10, T11, T12, T13, T14, T15]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T10, T11, T12, T13, T14, T15, T16]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f10: ReaderField[T10], + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} sealed trait DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) => B): ReaderBuilder[A] + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) => B + ): ReaderBuilder[A] } sealed trait DependentField10[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] - extends DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] { - def and[T11](f11: (A) => T11): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T11, T12](f11: (A) => T11, f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T11, T12, T13](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T11, T12, T13, T14](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T11, T12, T13, T14, T15](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T11, T12, T13, T14, T15, T16](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T11, T12, T13, T14, T15, T16, T17](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T11, T12, T13, T14, T15, T16, T17, T18](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f11: (A) => T11, f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T11](f11: ReaderField[T11]): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - def and[T11, T12](f11: ReaderField[T11], f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T11, T12, T13](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T11, T12, T13, T14](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T11, T12, T13, T14, T15](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T11, T12, T13, T14, T15, T16](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T11, T12, T13, T14, T15, T16, T17](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T11, T12, T13, T14, T15, T16, T17, T18](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f11: ReaderField[T11], f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) => B): ReaderBuilder[A] -} - -sealed trait DependentField11[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] - extends DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] { - def and[T12](f12: (A) => T12): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T12, T13](f12: (A) => T12, f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T12, T13, T14](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T12, T13, T14, T15](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T12, T13, T14, T15, T16](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T12, T13, T14, T15, T16, T17](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T12, T13, T14, T15, T16, T17, T18](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T12, T13, T14, T15, T16, T17, T18, T19](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f12: (A) => T12, f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T12](f12: ReaderField[T12]): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - def and[T12, T13](f12: ReaderField[T12], f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T12, T13, T14](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T12, T13, T14, T15](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T12, T13, T14, T15, T16](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T12, T13, T14, T15, T16, T17](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T12, T13, T14, T15, T16, T17, T18](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T12, T13, T14, T15, T16, T17, T18, T19](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f12: ReaderField[T12], f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) => B): ReaderBuilder[A] -} - -sealed trait DependentField12[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] - extends DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] { - def and[T13](f13: (A) => T13): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T13, T14](f13: (A) => T13, f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T13, T14, T15](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T13, T14, T15, T16](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T13, T14, T15, T16, T17](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T13, T14, T15, T16, T17, T18](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T13, T14, T15, T16, T17, T18, T19](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T13, T14, T15, T16, T17, T18, T19, T20](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f13: (A) => T13, f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T13](f13: ReaderField[T13]): DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - def and[T13, T14](f13: ReaderField[T13], f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T13, T14, T15](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T13, T14, T15, T16](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T13, T14, T15, T16, T17](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T13, T14, T15, T16, T17, T18](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T13, T14, T15, T16, T17, T18, T19](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T13, T14, T15, T16, T17, T18, T19, T20](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](f13: ReaderField[T13], f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) => B): ReaderBuilder[A] -} - -sealed trait DependentField13[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] - extends DependentField13F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] { - def and[T14](f14: (A) => T14): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T14, T15](f14: (A) => T14, f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T14, T15, T16](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T14, T15, T16, T17](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T14, T15, T16, T17, T18](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T14, T15, T16, T17, T18, T19](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T14, T15, T16, T17, T18, T19, T20](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T14, T15, T16, T17, T18, T19, T20, T21](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T14, T15, T16, T17, T18, T19, T20, T21, T22](f14: (A) => T14, f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T14](f14: ReaderField[T14]): DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - def and[T14, T15](f14: ReaderField[T14], f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T14, T15, T16](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T14, T15, T16, T17](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T14, T15, T16, T17, T18](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T14, T15, T16, T17, T18, T19](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T14, T15, T16, T17, T18, T19, T20](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T14, T15, T16, T17, T18, T19, T20, T21](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T14, T15, T16, T17, T18, T19, T20, T21, T22](f14: ReaderField[T14], f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} - - -sealed trait DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) => B): ReaderBuilder[A] -} - -sealed trait DependentField14[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] - extends DependentField14F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] { - def and[T15](f15: (A) => T15): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T15, T16](f15: (A) => T15, f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T15, T16, T17](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T15, T16, T17, T18](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T15, T16, T17, T18, T19](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T15, T16, T17, T18, T19, T20](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T15, T16, T17, T18, T19, T20, T21](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T15, T16, T17, T18, T19, T20, T21, T22](f15: (A) => T15, f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - - def and[T15](f15: ReaderField[T15]): DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - def and[T15, T16](f15: ReaderField[T15], f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T15, T16, T17](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T15, T16, T17, T18](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T15, T16, T17, T18, T19](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T15, T16, T17, T18, T19, T20](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T15, T16, T17, T18, T19, T20, T21](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T15, T16, T17, T18, T19, T20, T21, T22](f15: ReaderField[T15], f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] -} + extends DependentField10F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] { + def and[T11]( + f11: (A) => T11 + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T11, T12]( + f11: (A) => T11, + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T11, T12, T13]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13 + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T11, T12, T13, T14]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T11, T12, T13, T14, T15]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T11, T12, T13, T14, T15, T16]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T11, T12, T13, T14, T15, T16, T17]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f11: (A) => T11, + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + def and[T11]( + f11: ReaderField[T11] + ): DependentField11F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] + def and[T11, T12]( + f11: ReaderField[T11], + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T11, T12, T13]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T11, T12, T13, T14]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T11, T12, T13, T14, T15]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T11, T12, T13, T14, T15, T16]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T11, T12, T13, T14, T15, T16, T17]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f11: ReaderField[T11], + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} -sealed trait DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) => B): ReaderBuilder[A] +sealed trait DependentField11F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11 +] { + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) => B + ): ReaderBuilder[A] } -sealed trait DependentField15[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] - extends DependentField15F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] { - def and[T16](f16: (A) => T16): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T16, T17](f16: (A) => T16, f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T16, T17, T18](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T16, T17, T18, T19](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T16, T17, T18, T19, T20](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T16, T17, T18, T19, T20, T21](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T16, T17, T18, T19, T20, T21, T22](f16: (A) => T16, f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField11[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11 +] extends DependentField11F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11 + ] { + def and[T12]( + f12: (A) => T12 + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T12, T13](f12: (A) => T12, f13: (A) => T13): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T12, T13, T14]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14 + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T12, T13, T14, T15]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T12, T13, T14, T15, T16]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T12, T13, T14, T15, T16, T17]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T12, T13, T14, T15, T16, T17, T18]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f12: (A) => T12, + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] - def and[T16](f16: ReaderField[T16]): DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - def and[T16, T17](f16: ReaderField[T16], f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T16, T17, T18](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T16, T17, T18, T19](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T16, T17, T18, T19, T20](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T16, T17, T18, T19, T20, T21](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T16, T17, T18, T19, T20, T21, T22](f16: ReaderField[T16], f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T12]( + f12: ReaderField[T12] + ): DependentField12F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] + def and[T12, T13]( + f12: ReaderField[T12], + f13: ReaderField[T13] + ): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T12, T13, T14]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T12, T13, T14, T15]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T12, T13, T14, T15, T16]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T12, T13, T14, T15, T16, T17]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T12, T13, T14, T15, T16, T17, T18]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f12: ReaderField[T12], + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - -sealed trait DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) => B): ReaderBuilder[A] +sealed trait DependentField12F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12 +] { + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) => B + ): ReaderBuilder[A] } -sealed trait DependentField16[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] - extends DependentField16F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] { - def and[T17](f17: (A) => T17): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T17, T18](f17: (A) => T17, f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T17, T18, T19](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T17, T18, T19, T20](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T17, T18, T19, T20, T21](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T17, T18, T19, T20, T21, T22](f17: (A) => T17, f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField12[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12 +] extends DependentField12F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12 + ] { + def and[T13](f13: (A) => T13): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T13, T14](f13: (A) => T13, f14: (A) => T14): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T13, T14, T15]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15 + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T13, T14, T15, T16]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T13, T14, T15, T16, T17]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T13, T14, T15, T16, T17, T18]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T13, T14, T15, T16, T17, T18, T19]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f13: (A) => T13, + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] - def and[T17](f17: ReaderField[T17]): DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - def and[T17, T18](f17: ReaderField[T17], f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T17, T18, T19](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T17, T18, T19, T20](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T17, T18, T19, T20, T21](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T17, T18, T19, T20, T21, T22](f17: ReaderField[T17], f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T13](f13: ReaderField[T13]): DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] + def and[T13, T14]( + f13: ReaderField[T13], + f14: ReaderField[T14] + ): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T13, T14, T15]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T13, T14, T15, T16]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T13, T14, T15, T16, T17]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T13, T14, T15, T16, T17, T18]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T13, T14, T15, T16, T17, T18, T19]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20, T21]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f13: ReaderField[T13], + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - -sealed trait DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) => B): ReaderBuilder[A] +sealed trait DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 +] { + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) => B + ): ReaderBuilder[A] } -sealed trait DependentField17[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] - extends DependentField17F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] { - def and[T18](f18: (A) => T18): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T18, T19](f18: (A) => T18, f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T18, T19, T20](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T18, T19, T20, T21](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T18, T19, T20, T21, T22](f18: (A) => T18, f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField13[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 +] extends DependentField13F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13 + ] { + def and[T14](f14: (A) => T14): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T14, T15](f14: (A) => T14, f15: (A) => T15): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T14, T15, T16]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16 + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T14, T15, T16, T17]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T14, T15, T16, T17, T18]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T14, T15, T16, T17, T18, T19]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T14, T15, T16, T17, T18, T19, T20]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T14, T15, T16, T17, T18, T19, T20, T21]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f14: (A) => T14, + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] - def and[T18](f18: ReaderField[T18]): DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - def and[T18, T19](f18: ReaderField[T18], f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T18, T19, T20](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T18, T19, T20, T21](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T18, T19, T20, T21, T22](f18: ReaderField[T18], f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] + def and[T14](f14: ReaderField[T14]): DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] + def and[T14, T15]( + f14: ReaderField[T14], + f15: ReaderField[T15] + ): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T14, T15, T16]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T14, T15, T16, T17]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T14, T15, T16, T17, T18]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T14, T15, T16, T17, T18, T19]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T14, T15, T16, T17, T18, T19, T20]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T14, T15, T16, T17, T18, T19, T20, T21]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T14, T15, T16, T17, T18, T19, T20, T21, T22]( + f14: ReaderField[T14], + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } - -sealed trait DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) => B): ReaderBuilder[A] +sealed trait DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 +] { + def apply( + fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) => B + ): ReaderBuilder[A] } -sealed trait DependentField18[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] - extends DependentField18F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] { - def and[T19](f19: (A) => T19): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T19, T20](f19: (A) => T19, f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T19, T20, T21](f19: (A) => T19, f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T19, T20, T21, T22](f19: (A) => T19, f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField14[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 +] extends DependentField14F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14 + ] { + def and[T15](f15: (A) => T15): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T15, T16](f15: (A) => T15, f16: (A) => T16): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T15, T16, T17]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17 + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T15, T16, T17, T18]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T15, T16, T17, T18, T19]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T15, T16, T17, T18, T19, T20]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T15, T16, T17, T18, T19, T20, T21]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T15, T16, T17, T18, T19, T20, T21, T22]( + f15: (A) => T15, + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + + def and[T15](f15: ReaderField[T15]): DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] + def and[T15, T16]( + f15: ReaderField[T15], + f16: ReaderField[T16] + ): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T15, T16, T17]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T15, T16, T17, T18]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T15, T16, T17, T18, T19]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T15, T16, T17, T18, T19, T20]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T15, T16, T17, T18, T19, T20, T21]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T15, T16, T17, T18, T19, T20, T21, T22]( + f15: ReaderField[T15], + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} - def and[T19](f19: ReaderField[T19]): DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - def and[T19, T20](f19: ReaderField[T19], f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T19, T20, T21](f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T19, T20, T21, T22](f19: ReaderField[T19], f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField15[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 +] extends DependentField15F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15 + ] { + def and[T16](f16: (A) => T16): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T16, T17](f16: (A) => T16, f17: (A) => T17): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T16, T17, T18]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18 + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T16, T17, T18, T19]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T16, T17, T18, T19, T20]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T16, T17, T18, T19, T20, T21]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T16, T17, T18, T19, T20, T21, T22]( + f16: (A) => T16, + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] -sealed trait DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) => B): ReaderBuilder[A] + def and[T16](f16: ReaderField[T16]): DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] + def and[T16, T17]( + f16: ReaderField[T16], + f17: ReaderField[T17] + ): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T16, T17, T18]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T16, T17, T18, T19]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T16, T17, T18, T19, T20]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T16, T17, T18, T19, T20, T21]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T16, T17, T18, T19, T20, T21, T22]( + f16: ReaderField[T16], + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } -sealed trait DependentField19[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] - extends DependentField19F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] { - def and[T20](f20: (A) => T20): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T20, T21](f20: (A) => T20, f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T20, T21, T22](f20: (A) => T20, f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ) => B + ): ReaderBuilder[A] +} + +sealed trait DependentField16[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 +] extends DependentField16F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16 + ] { + def and[T17](f17: (A) => T17): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T17, T18](f17: (A) => T17, f18: (A) => T18): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T17, T18, T19]( + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19 + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T17, T18, T19, T20]( + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T17, T18, T19, T20, T21]( + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T17, T18, T19, T20, T21, T22]( + f17: (A) => T17, + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + + def and[T17](f17: ReaderField[T17]): DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] + def and[T17, T18]( + f17: ReaderField[T17], + f18: ReaderField[T18] + ): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T17, T18, T19]( + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T17, T18, T19, T20]( + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T17, T18, T19, T20, T21]( + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T17, T18, T19, T20, T21, T22]( + f17: ReaderField[T17], + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} - def and[T20](f20: ReaderField[T20]): DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - def and[T20, T21](f20: ReaderField[T20], f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T20, T21, T22](f20: ReaderField[T20], f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField17[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 +] extends DependentField17F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17 + ] { + def and[T18](f18: (A) => T18): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T18, T19](f18: (A) => T18, f19: (A) => T19): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T18, T19, T20]( + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20 + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T18, T19, T20, T21]( + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T18, T19, T20, T21, T22]( + f18: (A) => T18, + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] -sealed trait DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) => B): ReaderBuilder[A] + def and[T18](f18: ReaderField[T18]): DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] + def and[T18, T19]( + f18: ReaderField[T18], + f19: ReaderField[T19] + ): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T18, T19, T20]( + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T18, T19, T20, T21]( + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T18, T19, T20, T21, T22]( + f18: ReaderField[T18], + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } -sealed trait DependentField20[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] - extends DependentField20F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] { - def and[T21](f21: (A) => T21): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T21, T22](f21: (A) => T21, f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ) => B + ): ReaderBuilder[A] +} + +sealed trait DependentField18[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 +] extends DependentField18F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18 + ] { + def and[T19](f19: (A) => T19): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T19, T20](f19: (A) => T19, f20: (A) => T20): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T19, T20, T21]( + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21 + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T19, T20, T21, T22]( + f19: (A) => T19, + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + + def and[T19](f19: ReaderField[T19]): DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] + def and[T19, T20]( + f19: ReaderField[T19], + f20: ReaderField[T20] + ): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T19, T20, T21]( + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T19, T20, T21, T22]( + f19: ReaderField[T19], + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} - def and[T21](f21: ReaderField[T21]): DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - def and[T21, T22](f21: ReaderField[T21], f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField19[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 +] extends DependentField19F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19 + ] { + def and[T20](f20: (A) => T20): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T20, T21](f20: (A) => T20, f21: (A) => T21): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T20, T21, T22]( + f20: (A) => T20, + f21: (A) => T21, + f22: (A) => T22 + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] -sealed trait DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => B): ReaderBuilder[A] + def and[T20](f20: ReaderField[T20]): DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] + def and[T20, T21]( + f20: ReaderField[T20], + f21: ReaderField[T21] + ): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T20, T21, T22]( + f20: ReaderField[T20], + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } -sealed trait DependentField21[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] - extends DependentField21F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] { - def and[T22](f22: (A) => T22): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ) => B + ): ReaderBuilder[A] +} + +sealed trait DependentField20[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 +] extends DependentField20F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20 + ] { + def and[T21](f21: (A) => T21): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T21, T22](f21: (A) => T21, f22: (A) => T22): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] + + def and[T21](f21: ReaderField[T21]): DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] + def and[T21, T22]( + f21: ReaderField[T21], + f22: ReaderField[T22] + ): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] +} - def and[T22](f22: ReaderField[T22]): DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] +sealed trait DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField21[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 +] extends DependentField21F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21 + ] { + def and[T22](f22: (A) => T22): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] -sealed trait DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] { - def apply(fun: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) => B): ReaderBuilder[A] + def and[T22](f22: ReaderField[T22]): DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] } -sealed trait DependentField22[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] - extends DependentField22F[A, B, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] { +sealed trait DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 +] { + def apply( + fun: ( + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ) => B + ): ReaderBuilder[A] } +sealed trait DependentField22[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 +] extends DependentField22F[ + A, + B, + T1, + T2, + T3, + T4, + T5, + T6, + T7, + T8, + T9, + T10, + T11, + T12, + T13, + T14, + T15, + T16, + T17, + T18, + T19, + T20, + T21, + T22 + ] {} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala index a48535ce..83ff0b28 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/FieldStyle.scala @@ -19,22 +19,14 @@ enum FieldStyle { case CapitalizedSnakeCase case UncapitalizedSnakeCase - @deprecated("use FieldStyle.LowerCase") - case lowercase - @deprecated("use FieldStyle.UpperCase") - case uppercase - - @deprecated("use FieldStyle.SnakeCase") - case snakecase - @deprecated("use FieldStyle.LowerSnakeCase") - case lowerSnakecase - @deprecated("use FieldStyle.UpperSnakeCase") - case upperSnakecase + @deprecated("use FieldStyle.LowerCase") case lowercase + @deprecated("use FieldStyle.UpperCase") case uppercase - @deprecated("use FieldStyle.KebabCase") - case kebabcase - @deprecated("use FieldStyle.LowerKebabCase") - case lowerKebabcase - @deprecated("use FieldStyle.UpperKebabCase") - case upperKebabcase + @deprecated("use FieldStyle.SnakeCase") case snakecase + @deprecated("use FieldStyle.LowerSnakeCase") case lowerSnakecase + @deprecated("use FieldStyle.UpperSnakeCase") case upperSnakecase + + @deprecated("use FieldStyle.KebabCase") case kebabcase + @deprecated("use FieldStyle.LowerKebabCase") case lowerKebabcase + @deprecated("use FieldStyle.UpperKebabCase") case upperKebabcase } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/NotDescribedException.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/NotDescribedException.scala index e18f8bd2..ff8c3ad7 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/NotDescribedException.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/NotDescribedException.scala @@ -1,3 +1,4 @@ package tethys.derivation.builder -class NotDescribedException extends Exception("Definition should be in describe block", null) \ No newline at end of file +class NotDescribedException + extends Exception("Definition should be in describe block", null) diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala index 9d3815c0..ed98b215 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderDescription.scala @@ -1,8 +1,11 @@ package tethys.derivation.builder -case class ReaderDerivationConfig(fieldStyle: Option[FieldStyle], - isStrict: Boolean) { - def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = this.copy(fieldStyle = Some(fieldStyle)) +case class ReaderDerivationConfig( + fieldStyle: Option[FieldStyle], + isStrict: Boolean +) { + def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = + this.copy(fieldStyle = Some(fieldStyle)) def strict: ReaderDerivationConfig = this.copy(isStrict = true) } @@ -11,11 +14,15 @@ object ReaderDerivationConfig { fieldStyle = None, isStrict = false ) - def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = empty.withFieldStyle(fieldStyle) + def withFieldStyle(fieldStyle: FieldStyle): ReaderDerivationConfig = + empty.withFieldStyle(fieldStyle) def strict: ReaderDerivationConfig = empty.strict } -case class ReaderDescription[A](config: ReaderDerivationConfig, operations: Seq[ReaderDescription.BuilderOperation]) +case class ReaderDescription[A]( + config: ReaderDerivationConfig, + operations: Seq[ReaderDescription.BuilderOperation] +) object ReaderDescription { sealed trait Field[A] @@ -24,12 +31,20 @@ object ReaderDescription { final case class RawField[A](name: String) extends Field[A] } - sealed trait BuilderOperation object BuilderOperation { - final case class ExtractFieldAs[B, C](field: String, fun: B => C) extends BuilderOperation - final case class ExtractFieldValue(field: String, from: Seq[Field[?]], fun: Any) extends BuilderOperation - final case class ExtractFieldReader(field: String, from: Seq[Field[?]], fun: Any) extends BuilderOperation + final case class ExtractFieldAs[B, C](field: String, fun: B => C) + extends BuilderOperation + final case class ExtractFieldValue( + field: String, + from: Seq[Field[?]], + fun: Any + ) extends BuilderOperation + final case class ExtractFieldReader( + field: String, + from: Seq[Field[?]], + fun: Any + ) extends BuilderOperation } } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderField.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderField.scala index f37849d7..2db03095 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderField.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/ReaderField.scala @@ -3,4 +3,4 @@ package tethys.derivation.builder import scala.annotation.compileTimeOnly import scala.language.implicitConversions -sealed trait ReaderField[A] \ No newline at end of file +sealed trait ReaderField[A] diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala index cd9667ab..05f23699 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterBuilder.scala @@ -4,10 +4,8 @@ import tethys.derivation.builder.WriterBuilder.* import scala.annotation.compileTimeOnly - -/** - * Created by eld0727 on 22.04.17. - */ +/** Created by eld0727 on 22.04.17. + */ sealed trait WriterBuilder[A] { def remove[B](field: A => B): WriterBuilder[A] @@ -16,7 +14,9 @@ sealed trait WriterBuilder[A] { def update[B](field: A => B): FunApply[A, B] with WithRename[FunApply[A, B]] - def updatePartial[B](field: A => B): PartialFunApply[A, B] with WithRename[PartialFunApply[A, B]] + def updatePartial[B]( + field: A => B + ): PartialFunApply[A, B] with WithRename[PartialFunApply[A, B]] def add(name: String): FunApply[A, A] @@ -25,7 +25,9 @@ sealed trait WriterBuilder[A] { object WriterBuilder { - @compileTimeOnly("WriterBuilder should be defined in describe, jsonWriter of jsonReader macro") + @compileTimeOnly( + "WriterBuilder should be defined in describe, jsonWriter of jsonReader macro" + ) def apply[A <: Product]: WriterBuilder[A] = throw new NotDescribedException sealed trait WithRename[Res] { @@ -42,6 +44,3 @@ object WriterBuilder { def fromRoot[C](partial: PartialFunction[A, C]): WriterBuilder[A] } } - - - diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala index e5c95d8d..520155c5 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/builder/WriterDescription.scala @@ -2,28 +2,55 @@ package tethys.derivation.builder import tethys.derivation.builder.WriterDescription.BuilderOperation -case class WriterDerivationConfig(fieldStyle: Option[FieldStyle], discriminator: Option[String] = None) { - def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = this.copy(fieldStyle = Some(fieldStyle)) - def withDiscriminator(discriminator: String): WriterDerivationConfig = this.copy(discriminator = Some(discriminator)) +case class WriterDerivationConfig( + fieldStyle: Option[FieldStyle], + discriminator: Option[String] = None +) { + def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = + this.copy(fieldStyle = Some(fieldStyle)) + def withDiscriminator(discriminator: String): WriterDerivationConfig = + this.copy(discriminator = Some(discriminator)) } object WriterDerivationConfig { def empty: WriterDerivationConfig = WriterDerivationConfig(None) - def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = empty.copy(fieldStyle = Some(fieldStyle)) - def withDiscriminator(discriminator: String): WriterDerivationConfig = empty.copy(discriminator = Some(discriminator)) + def withFieldStyle(fieldStyle: FieldStyle): WriterDerivationConfig = + empty.copy(fieldStyle = Some(fieldStyle)) + def withDiscriminator(discriminator: String): WriterDerivationConfig = + empty.copy(discriminator = Some(discriminator)) } -case class WriterDescription[A](config: WriterDerivationConfig, operations: Seq[BuilderOperation[A]]) +case class WriterDescription[A]( + config: WriterDerivationConfig, + operations: Seq[BuilderOperation[A]] +) object WriterDescription { trait BuilderOperation[A] object BuilderOperation { case class Remove[T](field: String) extends BuilderOperation[T] - case class Update[T, From, To](field: String, name: Option[String], fun: From => To) extends BuilderOperation[T] - case class UpdateFromRoot[T, To](field: String, name: Option[String], fun: T => To) extends BuilderOperation[T] - case class UpdatePartial[T, From, To](field: String, name: Option[String], fun: PartialFunction[From, To]) extends BuilderOperation[T] - case class UpdatePartialFromRoot[T, To](field: String, name: Option[String], fun: PartialFunction[T, To]) extends BuilderOperation[T] - case class Add[T, To](field: String, fun: T => To) extends BuilderOperation[T] + case class Update[T, From, To]( + field: String, + name: Option[String], + fun: From => To + ) extends BuilderOperation[T] + case class UpdateFromRoot[T, To]( + field: String, + name: Option[String], + fun: T => To + ) extends BuilderOperation[T] + case class UpdatePartial[T, From, To]( + field: String, + name: Option[String], + fun: PartialFunction[From, To] + ) extends BuilderOperation[T] + case class UpdatePartialFromRoot[T, To]( + field: String, + name: Option[String], + fun: PartialFunction[T, To] + ) extends BuilderOperation[T] + case class Add[T, To](field: String, fun: T => To) + extends BuilderOperation[T] } -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/FieldStyle.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/FieldStyle.scala index dd9a6f87..aa1dfad8 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/FieldStyle.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/FieldStyle.scala @@ -4,14 +4,14 @@ import java.util.regex.Pattern import tethys.derivation.builder.{FieldStyle => ConfigFieldStyle} -private[impl] trait FieldStyle { self => +private[impl] trait FieldStyle { self => def applyStyle(field: String): String - private def andThen(that: FieldStyle): FieldStyle = (field: String) => that.applyStyle(self.applyStyle(field)) + private def andThen(that: FieldStyle): FieldStyle = (field: String) => + that.applyStyle(self.applyStyle(field)) private def >>(that: FieldStyle): FieldStyle = andThen(that) } - private[impl] object FieldStyle { def apply(fun: String => String): FieldStyle = fun(_) diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/Reflection.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/Reflection.scala index ef99e168..dc841572 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/Reflection.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/Reflection.scala @@ -16,25 +16,28 @@ trait Reflection { def searchInlineJsonWriter: Term = searchInline[JsonWriter] - def getWrite2Method: Term = underlying.searchInlineJsonWriter.selectWrite2Method + def getWrite2Method: Term = + underlying.searchInlineJsonWriter.selectWrite2Method - def getWrite3Method: Term = underlying.searchInlineJsonWriter.selectWrite3Method + def getWrite3Method: Term = + underlying.searchInlineJsonWriter.selectWrite3Method def searchInlineJsonObjectWriter: Term = searchInline[JsonObjectWriter] - def searchJsonReaderDefaultValue: Term = searchUnsafe[JsonReaderDefaultValue] + def searchJsonReaderDefaultValue: Term = + searchUnsafe[JsonReaderDefaultValue] def getDealiasFullName: String = underlying.dealias.typeSymbol.fullName - def wrappedTo[F[_] : Type]: TypeRepr = + def wrappedTo[F[_]: Type]: TypeRepr = underlying.asType match { case '[t] => TypeRepr.of[F[t]] } - + def createWriterTerm(f: TypeRepr => Term): Term = if (underlying =:= TypeRepr.of[Nothing]) '{ EmptyWriters.emptyWriter[Nothing] }.asTerm - else + else f(underlying) private def searchInline[F[_]: Type]: Term = underlying.asType match { @@ -46,9 +49,13 @@ trait Reflection { } private def searchUnsafe[F[_]: Type]: Term = underlying.asType match { - case '[t] => Expr.summon[F[t]] - .getOrElse(report.errorAndAbort(s"Can't find implicit for ${Type.show[F[t]]}")) - .asTerm + case '[t] => + Expr + .summon[F[t]] + .getOrElse( + report.errorAndAbort(s"Can't find implicit for ${Type.show[F[t]]}") + ) + .asTerm } } @@ -70,7 +77,8 @@ trait Reflection { f(underlying.select(getMethod)), ifEmpty ) - case _ => report.errorAndAbort(s"Field ${underlying.show} is not Option[_]") + case _ => + report.errorAndAbort(s"Field ${underlying.show} is not Option[_]") } } def selectWriteValuesMethod: Term = @@ -99,9 +107,15 @@ trait Reflection { underlying .methodMember(methodName) .headOption - .getOrElse(report.errorAndAbort(s"Can't find method $methodName in ${underlying.name}")) + .getOrElse( + report.errorAndAbort( + s"Can't find method $methodName in ${underlying.name}" + ) + ) - def findMethod(methodName: String)(pattern: Symbol => Boolean): Option[Symbol] = + def findMethod(methodName: String)( + pattern: Symbol => Boolean + ): Option[Symbol] = underlying.methodMember(methodName).find(pattern) } @@ -113,7 +127,8 @@ trait Reflection { def unapply(term: Term): Option[BuilderField] = term match { - case Lambda(List(ValDef(name, _, _)), body @ SelectChain(b)) if b.chain.size == 2 && name == b.chain.head => + case Lambda(List(ValDef(name, _, _)), body @ SelectChain(b)) + if b.chain.size == 2 && name == b.chain.head => Some(BuilderField(b.chain(1), body.tpe.widen)) case _ => None } @@ -139,7 +154,11 @@ trait Reflection { def collectDistinctSubtypes(baseTpe: TypeRepr): List[TypeRepr] = { def collectSubclasses(parent: Symbol): List[Symbol] = { parent.children.flatMap { child => - if (child.flags.is(Flags.Sealed) && (child.flags.is(Flags.Trait) || child.flags.is(Flags.Abstract))) + if ( + child.flags.is(Flags.Sealed) && (child.flags.is( + Flags.Trait + ) || child.flags.is(Flags.Abstract)) + ) collectSubclasses(child) else List(child) @@ -158,7 +177,9 @@ trait Reflection { val index = subst.indexWhere(_ =:= paramTpe) if (index != -1) baseArgs(index) else - report.errorAndAbort(s"$childSym contains additional type parameter that can't be derived in compile time") + report.errorAndAbort( + s"$childSym contains additional type parameter that can't be derived in compile time" + ) } childTpe.appliedTo(args) diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderCommons.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderCommons.scala index 64d7cc73..384fbfea 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderCommons.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderCommons.scala @@ -1,18 +1,22 @@ package tethys.derivation.impl.builder -import tethys.derivation.builder.{ReaderBuilder, ReaderDerivationConfig, ReaderDescription} +import tethys.derivation.builder.{ + ReaderBuilder, + ReaderDerivationConfig, + ReaderDescription +} import scala.quoted.* trait ReaderBuilderCommons extends ReaderBuilderUtils { import context.reflect.* - protected def convertReaderBuilder[T <: Product : Type]( - builder: Expr[ReaderBuilder[T]] + protected def convertReaderBuilder[T <: Product: Type]( + builder: Expr[ReaderBuilder[T]] ): Expr[ReaderDescription[T]] = { val withoutInlining = (builder.asTerm match { case Inlined(_, _, expansion) => expansion - case notInlined => notInlined + case notInlined => notInlined }).asExprOf[ReaderBuilder[T]] val description = extractDescription(withoutInlining) @@ -22,84 +26,216 @@ trait ReaderBuilderCommons extends ReaderBuilderUtils { protected lazy val emptyReaderConfig: Expr[ReaderDerivationConfig] = '{ ReaderDerivationConfig.empty } - private def extractDescription[T <: Product: Type](expr: Expr[ReaderBuilder[T]]): MacroReaderDescription = expr match { + private def extractDescription[T <: Product: Type]( + expr: Expr[ReaderBuilder[T]] + ): MacroReaderDescription = expr match { // ===== ROOT ===== case '{ ReaderBuilder.apply[t] } => MacroReaderDescription(emptyReaderConfig, Seq()) // ===== FieldAs ===== - case '{ ($rest: ReaderBuilder[T]).extract[tpe](${BuilderField(f)}).as[as].apply($fun) } => + case '{ + ($rest: ReaderBuilder[T]) + .extract[tpe](${ BuilderField(f) }) + .as[as] + .apply($fun) + } => val description = extractDescription(rest) description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldAs( - f.name, TypeRepr.of[tpe], TypeRepr.of[as], fun.asTerm + f.name, + TypeRepr.of[tpe], + TypeRepr.of[as], + fun.asTerm ) ) // ===== FieldStyle ===== case '{ ($rest: ReaderBuilder[T]).fieldStyle($style) } => val description = extractDescription(rest) - description.copy(config = '{ (${ description.config }: ReaderDerivationConfig).withFieldStyle($style) }) + description.copy(config = '{ + (${ description.config }: ReaderDerivationConfig).withFieldStyle($style) + }) // ===== isStrict ===== case '{ ($rest: ReaderBuilder[T]).strict } => val description = extractDescription(rest) - description.copy(config = '{ (${ description.config }: ReaderDerivationConfig).strict }) - - case other => other.asTerm match { - // ===== FieldValue ===== - - // q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" - case Apply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(rest, "extract"), _), List(BuilderField(f))), "from"), _), fs), "apply"), List(fun)) => - val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) - val fsFields = fs.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldValue( - f.name, fsFields, fun - )) - - // q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" - case Apply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(rest, "extract"), _), List(BuilderField(f))), "from"), _), fs), "and"), _), ands), "apply"), List(fun)) => - val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) - val fsFields = fs.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - val andsFields = ands.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldValue( - f.name, fsFields ++ andsFields, fun - )) - - // ===== FieldReader ===== - - // q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" - case Apply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(rest, "extractReader"), _), List(BuilderField(f))), "from"), _), fs), "apply"), List(fun)) => - val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) - val fsFields = fs.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldReader( - f.name, fsFields, fun - )) - - - // q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" - case Apply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(Apply(TypeApply(Select(rest, "extractReader"), _), List(BuilderField(f))), "from"), _), fs), "and"), _), ands), "apply"), List(fun)) => - val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) - val fsFields = fs.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - val andsFields = ands.map(fTerm => - BuilderField.unapply(fTerm).fold(Field.unlift(fTerm))(Field.fromBuilderField) - ) - description.copy(operations = description.operations :+ ReaderMacroOperation.ExtractFieldReader( - f.name, fsFields ++ andsFields, fun - )) - - // ===== NOPE ===== - case _ => report.errorAndAbort(s"unknown tree: ${expr.asTerm.show}") - } + description.copy(config = '{ + (${ description.config }: ReaderDerivationConfig).strict + }) + + case other => + other.asTerm match { + // ===== FieldValue ===== + + // q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" + case Apply( + Select( + Apply( + TypeApply( + Select( + Apply( + TypeApply(Select(rest, "extract"), _), + List(BuilderField(f)) + ), + "from" + ), + _ + ), + fs + ), + "apply" + ), + List(fun) + ) => + val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) + val fsFields = fs.map(fTerm => + BuilderField + .unapply(fTerm) + .fold(Field.unlift(fTerm))(Field.fromBuilderField) + ) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldValue( + f.name, + fsFields, + fun + ) + ) + + // q"${rest: Tree}.extract[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" + case Apply( + Select( + Apply( + TypeApply( + Select( + Apply( + TypeApply( + Select( + Apply( + TypeApply(Select(rest, "extract"), _), + List(BuilderField(f)) + ), + "from" + ), + _ + ), + fs + ), + "and" + ), + _ + ), + ands + ), + "apply" + ), + List(fun) + ) => + val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) + val fsFields = fs.map(fTerm => + BuilderField + .unapply(fTerm) + .fold(Field.unlift(fTerm))(Field.fromBuilderField) + ) + val andsFields = ands.map(fTerm => + BuilderField + .unapply(fTerm) + .fold(Field.unlift(fTerm))(Field.fromBuilderField) + ) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldValue( + f.name, + fsFields ++ andsFields, + fun + ) + ) + + // ===== FieldReader ===== + + // q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).apply(${fun: Tree})" + case Apply( + Select( + Apply( + TypeApply( + Select( + Apply( + TypeApply(Select(rest, "extractReader"), _), + List(BuilderField(f)) + ), + "from" + ), + _ + ), + fs + ), + "apply" + ), + List(fun) + ) => + val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) + val fsFields = fs.map(fTerm => + BuilderField + .unapply(fTerm) + .fold(Field.unlift(fTerm))(Field.fromBuilderField) + ) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldReader( + f.name, + fsFields, + fun + ) + ) + + // q"${rest: Tree}.extractReader[$tpe](${f: BuilderField}).from[..$_](..${fs: Seq[Field]}).and[..$_](..${ands: Seq[Field]}).apply(${fun: Tree})" + case Apply( + Select( + Apply( + TypeApply( + Select( + Apply( + TypeApply( + Select( + Apply( + TypeApply(Select(rest, "extractReader"), _), + List(BuilderField(f)) + ), + "from" + ), + _ + ), + fs + ), + "and" + ), + _ + ), + ands + ), + "apply" + ), + List(fun) + ) => + val description = extractDescription(rest.asExprOf[ReaderBuilder[T]]) + val fsFields = fs.map(fTerm => + BuilderField + .unapply(fTerm) + .fold(Field.unlift(fTerm))(Field.fromBuilderField) + ) + val andsFields = ands.map(fTerm => + BuilderField + .unapply(fTerm) + .fold(Field.unlift(fTerm))(Field.fromBuilderField) + ) + description.copy(operations = + description.operations :+ ReaderMacroOperation.ExtractFieldReader( + f.name, + fsFields ++ andsFields, + fun + ) + ) + + // ===== NOPE ===== + case _ => report.errorAndAbort(s"unknown tree: ${expr.asTerm.show}") + } } } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderUtils.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderUtils.scala index 223fc95a..7bd85274 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderUtils.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderBuilderUtils.scala @@ -2,7 +2,11 @@ package tethys.derivation.impl.builder import tethys.derivation.semiauto.* import tethys.derivation.impl.FieldStyle -import tethys.derivation.builder.{FieldStyle as ConfigFieldStyle, ReaderDerivationConfig, ReaderDescription} +import tethys.derivation.builder.{ + FieldStyle as ConfigFieldStyle, + ReaderDerivationConfig, + ReaderDescription +} import tethys.derivation.impl.Reflection import scala.quoted.* @@ -11,20 +15,32 @@ import tethys.derivation.builder trait ReaderBuilderUtils extends Reflection { import context.reflect.* - case class MacroReaderDescription(config: Expr[ReaderDerivationConfig], operations: Seq[ReaderMacroOperation]) { + case class MacroReaderDescription( + config: Expr[ReaderDerivationConfig], + operations: Seq[ReaderMacroOperation] + ) { def lift[T: Type]: Expr[ReaderDescription[T]] = - '{ReaderDescription[T]($config, ${Expr.ofSeq(operations.map(_.lift))})} + '{ + ReaderDescription[T]($config, ${ Expr.ofSeq(operations.map(_.lift)) }) + } } object MacroReaderDescription { - def unlift[T: Type](wd: Expr[ReaderDescription[T]]): MacroReaderDescription = { + def unlift[T: Type]( + wd: Expr[ReaderDescription[T]] + ): MacroReaderDescription = { val withoutInlining = (wd.asTerm.underlying match { case Inlined(_, _, expansion) => expansion - case notInlined => notInlined + case notInlined => notInlined }).asExprOf[ReaderDescription[T]] withoutInlining match { - case '{ ReaderDescription.apply[T] ($config, ${Varargs(operations)}) } => - MacroReaderDescription(config, operations.map(ReaderMacroOperation.unlift[T])) + case '{ + ReaderDescription.apply[T]($config, ${ Varargs(operations) }) + } => + MacroReaderDescription( + config, + operations.map(ReaderMacroOperation.unlift[T]) + ) } } } @@ -35,12 +51,14 @@ trait ReaderBuilderUtils extends Reflection { def lift: Expr[ReaderDescription.Field[?]] = self match { case Field.ClassField(name, tpe) => - tpe.asType match { case '[t] => - '{ ReaderDescription.Field.ClassField[t](${Expr(name)}) } + tpe.asType match { + case '[t] => + '{ ReaderDescription.Field.ClassField[t](${ Expr(name) }) } } case Field.RawField(name, tpe) => - tpe.asType match { case '[t] => - '{ ReaderDescription.Field.RawField[t](${Expr(name)}) } + tpe.asType match { + case '[t] => + '{ ReaderDescription.Field.RawField[t](${ Expr(name) }) } } } } @@ -73,33 +91,95 @@ trait ReaderBuilderUtils extends Reflection { case ReaderMacroOperation.ExtractFieldAs(field, tpe, as, fun) => (tpe.asType, as.asType) match { case ('[tpe], '[as]) => - '{ ReaderDescription.BuilderOperation.ExtractFieldAs[as, tpe](${Expr(field)}, ${fun.asExprOf[Function[as, tpe]]}) } + '{ + ReaderDescription.BuilderOperation.ExtractFieldAs[as, tpe]( + ${ Expr(field) }, + ${ fun.asExprOf[Function[as, tpe]] } + ) + } } case ReaderMacroOperation.ExtractFieldValue(field, from, fun) => - '{ ReaderDescription.BuilderOperation.ExtractFieldValue(${Expr(field)}, ${Expr.ofSeq(from.map(_.lift))}, ${fun.asExprOf[Any]}) } + '{ + ReaderDescription.BuilderOperation.ExtractFieldValue( + ${ Expr(field) }, + ${ Expr.ofSeq(from.map(_.lift)) }, + ${ fun.asExprOf[Any] } + ) + } case ReaderMacroOperation.ExtractFieldReader(field, from, fun) => - '{ ReaderDescription.BuilderOperation.ExtractFieldReader(${Expr(field)}, ${Expr.ofSeq(from.map(_.lift))}, ${fun.asExprOf[Any]}) } + '{ + ReaderDescription.BuilderOperation.ExtractFieldReader( + ${ Expr(field) }, + ${ Expr.ofSeq(from.map(_.lift)) }, + ${ fun.asExprOf[Any] } + ) + } } } object ReaderMacroOperation { - final case class ExtractFieldAs(field: String, tpe: TypeRepr, as: TypeRepr, fun: Term) extends ReaderMacroOperation - final case class ExtractFieldValue(field: String, from: Seq[Field], fun: Term) extends ReaderMacroOperation - final case class ExtractFieldReader(field: String, from: Seq[Field], fun: Term) extends ReaderMacroOperation - - def unlift[T: Type](bo: Expr[ReaderDescription.BuilderOperation]): ReaderMacroOperation = + final case class ExtractFieldAs( + field: String, + tpe: TypeRepr, + as: TypeRepr, + fun: Term + ) extends ReaderMacroOperation + final case class ExtractFieldValue( + field: String, + from: Seq[Field], + fun: Term + ) extends ReaderMacroOperation + final case class ExtractFieldReader( + field: String, + from: Seq[Field], + fun: Term + ) extends ReaderMacroOperation + + def unlift[T: Type]( + bo: Expr[ReaderDescription.BuilderOperation] + ): ReaderMacroOperation = bo match { - case '{ ReaderDescription.BuilderOperation.ExtractFieldAs.apply[as, tpe]($field, $fun) } => - ReaderMacroOperation.ExtractFieldAs(field.valueOrAbort, TypeRepr.of[tpe], TypeRepr.of[as], fun.asTerm) - case '{ ReaderDescription.BuilderOperation.ExtractFieldValue.apply($field, ${Varargs(from)}, $fun) } => - ReaderMacroOperation.ExtractFieldValue(field.valueOrAbort, from.map(f => Field.unlift(f.asTerm)), fun.asTerm) - case '{ ReaderDescription.BuilderOperation.ExtractFieldReader.apply($field, ${Varargs(from)}, $fun) } => - ReaderMacroOperation.ExtractFieldReader(field.valueOrAbort, from.map(f => Field.unlift(f.asTerm)), fun.asTerm) + case '{ + ReaderDescription.BuilderOperation.ExtractFieldAs + .apply[as, tpe]($field, $fun) + } => + ReaderMacroOperation.ExtractFieldAs( + field.valueOrAbort, + TypeRepr.of[tpe], + TypeRepr.of[as], + fun.asTerm + ) + case '{ + ReaderDescription.BuilderOperation.ExtractFieldValue.apply( + $field, + ${ Varargs(from) }, + $fun + ) + } => + ReaderMacroOperation.ExtractFieldValue( + field.valueOrAbort, + from.map(f => Field.unlift(f.asTerm)), + fun.asTerm + ) + case '{ + ReaderDescription.BuilderOperation.ExtractFieldReader.apply( + $field, + ${ Varargs(from) }, + $fun + ) + } => + ReaderMacroOperation.ExtractFieldReader( + field.valueOrAbort, + from.map(f => Field.unlift(f.asTerm)), + fun.asTerm + ) } } - protected def evalReaderConfig(configExpr: Expr[ReaderDerivationConfig]): (Option[FieldStyle], Boolean) = { + protected def evalReaderConfig( + configExpr: Expr[ReaderDerivationConfig] + ): (Option[FieldStyle], Boolean) = { def parseConfigExpr( confExpr: Expr[ReaderDerivationConfig], fieldStyleExpr: Option[Expr[ConfigFieldStyle]], @@ -113,7 +193,10 @@ trait ReaderBuilderUtils extends Reflection { (fieldStyleExpr, isStrictExpr.orElse(Some(isStrict))) case '{ ReaderDerivationConfig.apply(Some($fieldStyle), $isStrict) } => - (fieldStyleExpr.orElse(Some(fieldStyle)), isStrictExpr.orElse(Some(isStrict))) + ( + fieldStyleExpr.orElse(Some(fieldStyle)), + isStrictExpr.orElse(Some(isStrict)) + ) case '{ ReaderDerivationConfig.withFieldStyle($fieldStyle) } => (fieldStyleExpr.orElse(Some(fieldStyle)), isStrictExpr) @@ -121,13 +204,22 @@ trait ReaderBuilderUtils extends Reflection { case '{ ReaderDerivationConfig.strict } => (fieldStyleExpr, Some(Expr(true))) - case '{ ($config: ReaderDerivationConfig).withFieldStyle($fieldStyle) } => - parseConfigExpr(config, fieldStyleExpr.orElse(Some(fieldStyle)), isStrictExpr) + case '{ + ($config: ReaderDerivationConfig).withFieldStyle($fieldStyle) + } => + parseConfigExpr( + config, + fieldStyleExpr.orElse(Some(fieldStyle)), + isStrictExpr + ) case '{ ($config: ReaderDerivationConfig).strict } => parseConfigExpr(config, fieldStyleExpr, Some(Expr(true))) - case _ => report.errorAndAbort(s"Config parsing error. Unknown expr: ${confExpr.asTerm.show}") + case _ => + report.errorAndAbort( + s"Config parsing error. Unknown expr: ${confExpr.asTerm.show}" + ) } val (fieldStyleExpr, isStrictExpr) = parseConfigExpr(configExpr, None, None) @@ -140,17 +232,21 @@ trait ReaderBuilderUtils extends Reflection { case '{ ConfigFieldStyle.Capitalize } => FieldStyle.capitalize case '{ ConfigFieldStyle.Uncapitalize } => FieldStyle.uncapitalize - case '{ ConfigFieldStyle.KebabCase } => FieldStyle.kebabcase - case '{ ConfigFieldStyle.LowerKebabCase } => FieldStyle.lowerKebabcase - case '{ ConfigFieldStyle.UpperKebabCase } => FieldStyle.upperKebabcase - case '{ ConfigFieldStyle.CapitalizedKebabCase } => FieldStyle.capitalizedKebabCase - case '{ ConfigFieldStyle.UncapitalizedKebabCase } => FieldStyle.uncapitalizedKebabCase - - case '{ ConfigFieldStyle.SnakeCase } => FieldStyle.snakecase - case '{ ConfigFieldStyle.LowerSnakeCase } => FieldStyle.lowerSnakecase - case '{ ConfigFieldStyle.UpperSnakeCase } => FieldStyle.upperSnakecase - case '{ ConfigFieldStyle.CapitalizedSnakeCase } => FieldStyle.capitalizedSnakecase - case '{ ConfigFieldStyle.UncapitalizedSnakeCase } => FieldStyle.uncapitalizedSnakecase + case '{ ConfigFieldStyle.KebabCase } => FieldStyle.kebabcase + case '{ ConfigFieldStyle.LowerKebabCase } => FieldStyle.lowerKebabcase + case '{ ConfigFieldStyle.UpperKebabCase } => FieldStyle.upperKebabcase + case '{ ConfigFieldStyle.CapitalizedKebabCase } => + FieldStyle.capitalizedKebabCase + case '{ ConfigFieldStyle.UncapitalizedKebabCase } => + FieldStyle.uncapitalizedKebabCase + + case '{ ConfigFieldStyle.SnakeCase } => FieldStyle.snakecase + case '{ ConfigFieldStyle.LowerSnakeCase } => FieldStyle.lowerSnakecase + case '{ ConfigFieldStyle.UpperSnakeCase } => FieldStyle.upperSnakecase + case '{ ConfigFieldStyle.CapitalizedSnakeCase } => + FieldStyle.capitalizedSnakecase + case '{ ConfigFieldStyle.UncapitalizedSnakeCase } => + FieldStyle.uncapitalizedSnakecase case '{ ConfigFieldStyle.lowercase } => FieldStyle.lowercase case '{ ConfigFieldStyle.uppercase } => FieldStyle.uppercase @@ -161,17 +257,25 @@ trait ReaderBuilderUtils extends Reflection { case '{ ConfigFieldStyle.lowerSnakecase } => FieldStyle.lowerSnakecase case '{ ConfigFieldStyle.upperSnakecase } => FieldStyle.upperSnakecase - case _ => report.errorAndAbort("fieldStyle in reader config can not be computed in compile-time") + case _ => + report.errorAndAbort( + "fieldStyle in reader config can not be computed in compile-time" + ) } } - val isStrict = isStrictExpr.map( - _.asTerm - .underlying - .asExprOf[Boolean] - .value - .getOrElse(report.errorAndAbort("isStrict in reader config can not be computed in compile-time")) - ).getOrElse(false) + val isStrict = isStrictExpr + .map( + _.asTerm.underlying + .asExprOf[Boolean] + .value + .getOrElse( + report.errorAndAbort( + "isStrict in reader config can not be computed in compile-time" + ) + ) + ) + .getOrElse(false) (fieldStyle, isStrict) } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala index f840740c..de59561b 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/ReaderDescriptionMacro.scala @@ -8,6 +8,8 @@ class ReaderDescriptionMacro(val quotes: Quotes) extends ReaderBuilderCommons { implicit val context: Quotes = quotes import context.reflect.* - def simpleDescription[T <: Product : Type](builder: Expr[ReaderBuilder[T]]): Expr[ReaderDescription[T]] = + def simpleDescription[T <: Product: Type]( + builder: Expr[ReaderBuilder[T]] + ): Expr[ReaderDescription[T]] = convertReaderBuilder[T](builder) } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderCommons.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderCommons.scala index 5a3907ea..1a086b7d 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderCommons.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderCommons.scala @@ -3,44 +3,55 @@ package tethys.derivation.impl.builder import scala.annotation.tailrec import scala.quoted.* -import tethys.derivation.builder.{WriterBuilder, WriterDerivationConfig, WriterDescription} +import tethys.derivation.builder.{ + WriterBuilder, + WriterDerivationConfig, + WriterDescription +} import tethys.derivation.impl.builder.WriterBuilderUtils trait WriterBuilderCommons extends WriterBuilderUtils { import context.reflect.* protected def convertWriterBuilder[T <: Product: Type]( - builder: Expr[WriterBuilder[T]] + builder: Expr[WriterBuilder[T]] ): Expr[WriterDescription[T]] = { val withoutInlining = (builder.asTerm match { case Inlined(_, _, expansion) => expansion - case notInlined => notInlined + case notInlined => notInlined }).asExprOf[WriterBuilder[T]] val description = extractSimpleDescription(withoutInlining) checkOperations(description.operations) description.lift } - private def extractSimpleDescription[T <: Product : Type](expr: Expr[WriterBuilder[T]]): MacroWriteDescription = { + private def extractSimpleDescription[T <: Product: Type]( + expr: Expr[WriterBuilder[T]] + ): MacroWriteDescription = { @tailrec def loop( - expr: Expr[WriterBuilder[T]], - config: Expr[WriterDerivationConfig], - operations: Seq[WriterMacroOperation] + expr: Expr[WriterBuilder[T]], + config: Expr[WriterDerivationConfig], + operations: Seq[WriterMacroOperation] ): (Expr[WriterDerivationConfig], Seq[WriterMacroOperation]) = { expr match { case '{ - type tpe <: T; - WriterBuilder.apply[`tpe`] - } => config -> operations + type tpe <: T; + WriterBuilder.apply[`tpe`] + } => + config -> operations // ===== remove ===== case '{ ($rest: WriterBuilder[T]).remove(${ BuilderField(f) }) } => - val op: WriterMacroOperation = WriterMacroOperation.Remove(tpe = TypeRepr.of[T], field = f.name) + val op: WriterMacroOperation = + WriterMacroOperation.Remove(tpe = TypeRepr.of[T], field = f.name) loop(rest, config, op +: operations) // ===== rename ===== - case '{ ($rest: WriterBuilder[T]).rename[from](${ BuilderField(f) })($rename) } => + case '{ + ($rest: WriterBuilder[T]) + .rename[from](${ BuilderField(f) })($rename) + } => val fromTpe = TypeRepr.of[from] val op: WriterMacroOperation = WriterMacroOperation.Update( tpe = TypeRepr.of[T], @@ -53,7 +64,11 @@ trait WriterBuilderCommons extends WriterBuilderUtils { loop(rest, config, op +: operations) // ===== update ===== - case '{ ($rest: WriterBuilder[T]).update[from](${ BuilderField(f) }).apply[to]($updater) } => + case '{ + ($rest: WriterBuilder[T]) + .update[from](${ BuilderField(f) }) + .apply[to]($updater) + } => val op: WriterMacroOperation = WriterMacroOperation.Update( tpe = TypeRepr.of[T], field = f.name, @@ -65,7 +80,12 @@ trait WriterBuilderCommons extends WriterBuilderUtils { loop(rest, config, op +: operations) // ===== update with rename ===== - case '{ ($rest: WriterBuilder[T]).update[from](${ BuilderField(f) }).withRename($rename).apply[to]($updater) } => + case '{ + ($rest: WriterBuilder[T]) + .update[from](${ BuilderField(f) }) + .withRename($rename) + .apply[to]($updater) + } => val op: WriterMacroOperation = WriterMacroOperation.Update( tpe = TypeRepr.of[T], field = f.name, @@ -77,7 +97,11 @@ trait WriterBuilderCommons extends WriterBuilderUtils { loop(rest, config, op +: operations) // ===== update from root ===== - case '{ ($rest: WriterBuilder[T]).update(${ BuilderField(f) }).fromRoot[to]($updater) } => + case '{ + ($rest: WriterBuilder[T]) + .update(${ BuilderField(f) }) + .fromRoot[to]($updater) + } => val op: WriterMacroOperation = WriterMacroOperation.UpdateFromRoot( tpe = TypeRepr.of[T], field = f.name, @@ -88,7 +112,12 @@ trait WriterBuilderCommons extends WriterBuilderUtils { loop(rest, config, op +: operations) // ===== update from root with rename ===== - case '{ ($rest: WriterBuilder[T]).update(${ BuilderField(f) }).withRename($rename).fromRoot[to]($updater) } => + case '{ + ($rest: WriterBuilder[T]) + .update(${ BuilderField(f) }) + .withRename($rename) + .fromRoot[to]($updater) + } => val op: WriterMacroOperation = WriterMacroOperation.UpdateFromRoot( tpe = TypeRepr.of[T], field = f.name, @@ -99,7 +128,11 @@ trait WriterBuilderCommons extends WriterBuilderUtils { loop(rest, config, op +: operations) // ===== update partial ===== - case '{ ($rest: WriterBuilder[T]).updatePartial[from](${ BuilderField(f) }).apply[to]($updater) } => + case '{ + ($rest: WriterBuilder[T]) + .updatePartial[from](${ BuilderField(f) }) + .apply[to]($updater) + } => val op: WriterMacroOperation = WriterMacroOperation.UpdatePartial( tpe = TypeRepr.of[T], field = f.name, @@ -111,7 +144,12 @@ trait WriterBuilderCommons extends WriterBuilderUtils { loop(rest, config, op +: operations) // ===== update partial with rename ===== - case '{ ($rest: WriterBuilder[T]).updatePartial[from](${ BuilderField(f) }).withRename($rename).apply[to]($updater) } => + case '{ + ($rest: WriterBuilder[T]) + .updatePartial[from](${ BuilderField(f) }) + .withRename($rename) + .apply[to]($updater) + } => val op: WriterMacroOperation = WriterMacroOperation.UpdatePartial( tpe = TypeRepr.of[T], field = f.name, @@ -123,7 +161,11 @@ trait WriterBuilderCommons extends WriterBuilderUtils { loop(rest, config, op +: operations) // ===== update partial from root ===== - case '{ ($rest: WriterBuilder[T]).updatePartial(${ BuilderField(f) }).fromRoot[to]($updater) } => + case '{ + ($rest: WriterBuilder[T]) + .updatePartial(${ BuilderField(f) }) + .fromRoot[to]($updater) + } => val op = WriterMacroOperation.UpdatePartialFromRoot( tpe = TypeRepr.of[T], field = f.name, @@ -134,7 +176,12 @@ trait WriterBuilderCommons extends WriterBuilderUtils { loop(rest, config, op +: operations) // ===== update partial from root with rename ===== - case '{ ($rest: WriterBuilder[T]).updatePartial(${ BuilderField(f) }).withRename($rename).fromRoot[to]($updater) } => + case '{ + ($rest: WriterBuilder[T]) + .updatePartial(${ BuilderField(f) }) + .withRename($rename) + .fromRoot[to]($updater) + } => val op = WriterMacroOperation.UpdatePartialFromRoot( tpe = TypeRepr.of[T], field = f.name, @@ -156,7 +203,9 @@ trait WriterBuilderCommons extends WriterBuilderUtils { // ===== FieldStyle ===== case '{ ($rest: WriterBuilder[T]).fieldStyle($style) } => - val cfg: Expr[WriterDerivationConfig] = '{ (${ config }: WriterDerivationConfig).withFieldStyle($style) } + val cfg: Expr[WriterDerivationConfig] = '{ + (${ config }: WriterDerivationConfig).withFieldStyle($style) + } loop(rest, config = cfg, operations) // ===== NOPE ===== @@ -164,7 +213,8 @@ trait WriterBuilderCommons extends WriterBuilderUtils { } } - val (config, operations) = loop(expr, config = emptyWriterConfig, operations = Seq()) + val (config, operations) = + loop(expr, config = emptyWriterConfig, operations = Seq()) MacroWriteDescription(TypeRepr.of[T], config, operations) } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderUtils.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderUtils.scala index ff80a71f..86fd8a33 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderUtils.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterBuilderUtils.scala @@ -3,7 +3,11 @@ package tethys.derivation.impl.builder import scala.annotation.tailrec import scala.quoted.* -import tethys.derivation.builder.{WriterDerivationConfig, WriterDescription, FieldStyle as ConfigFieldStyle} +import tethys.derivation.builder.{ + WriterDerivationConfig, + WriterDescription, + FieldStyle as ConfigFieldStyle +} import tethys.derivation.impl.{FieldStyle, Reflection} trait WriterBuilderUtils extends Reflection { @@ -18,7 +22,12 @@ trait WriterBuilderUtils extends Reflection { operations: Seq[WriterMacroOperation] ) { self => def lift[T: Type]: Expr[WriterDescription[T]] = - '{ WriterDescription[T]($config, ${ Expr.ofSeq(operations.map(_.lift[T])) }) } + '{ + WriterDescription[T]( + $config, + ${ Expr.ofSeq(operations.map(_.lift[T])) } + ) + } } object MacroWriteDescription { @@ -29,15 +38,23 @@ trait WriterBuilderUtils extends Reflection { operations = Seq() ) - def unlift[T: Type](wd: Expr[WriterDescription[T]]): MacroWriteDescription = { + def unlift[T: Type]( + wd: Expr[WriterDescription[T]] + ): MacroWriteDescription = { val withoutInlining = (wd.asTerm.underlying match { case Inlined(_, _, expansion) => expansion case notInlined => notInlined }).asExprOf[WriterDescription[T]] withoutInlining match { - case '{ WriterDescription.apply[T]($config, ${ Varargs(operations) }) } => - MacroWriteDescription(TypeRepr.of[T], config, operations.map(WriterMacroOperation.unlift[T])) + case '{ + WriterDescription.apply[T]($config, ${ Varargs(operations) }) + } => + MacroWriteDescription( + TypeRepr.of[T], + config, + operations.map(WriterMacroOperation.unlift[T]) + ) } } } @@ -72,35 +89,51 @@ trait WriterBuilderUtils extends Reflection { (tpe.asType, to.asType) match { case ('[tpe], '[to]) => '{ - WriterDescription.BuilderOperation.UpdateFromRoot.apply[tpe, to]( - ${ Expr(field) }, - $name, - ${ fun.asExprOf[Function[tpe, to]] } - ) + WriterDescription.BuilderOperation.UpdateFromRoot + .apply[tpe, to]( + ${ Expr(field) }, + $name, + ${ fun.asExprOf[Function[tpe, to]] } + ) }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] } - case WriterMacroOperation.UpdatePartial(tpe, field, name, fun, from, to) => + case WriterMacroOperation.UpdatePartial( + tpe, + field, + name, + fun, + from, + to + ) => (tpe.asType, from.asType, to.asType) match { case ('[tpe], '[from], '[to]) => '{ - WriterDescription.BuilderOperation.UpdatePartial.apply[tpe, from, to]( - ${ Expr(field) }, - $name, - ${ fun.asExprOf[PartialFunction[from, to]] } - ) + WriterDescription.BuilderOperation.UpdatePartial + .apply[tpe, from, to]( + ${ Expr(field) }, + $name, + ${ fun.asExprOf[PartialFunction[from, to]] } + ) }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] } - case WriterMacroOperation.UpdatePartialFromRoot(tpe, field, name, fun, to) => + case WriterMacroOperation.UpdatePartialFromRoot( + tpe, + field, + name, + fun, + to + ) => (tpe.asType, to.asType) match { case ('[tpe], '[to]) => '{ - WriterDescription.BuilderOperation.UpdatePartialFromRoot.apply[tpe, to]( - ${ Expr(field) }, - $name, - ${ fun.asExprOf[PartialFunction[tpe, to]] } - ) + WriterDescription.BuilderOperation.UpdatePartialFromRoot + .apply[tpe, to]( + ${ Expr(field) }, + $name, + ${ fun.asExprOf[PartialFunction[tpe, to]] } + ) }.asInstanceOf[Expr[WriterDescription.BuilderOperation[T]]] } @@ -119,22 +152,52 @@ trait WriterBuilderUtils extends Reflection { object WriterMacroOperation { case class Remove(tpe: TypeRepr, field: String) extends WriterMacroOperation - case class Update(tpe: TypeRepr, field: String, name: Expr[Option[String]], fun: Term, from: TypeRepr, to: TypeRepr) - extends WriterMacroOperation - case class UpdateFromRoot(tpe: TypeRepr, field: String, name: Expr[Option[String]], fun: Term, to: TypeRepr) - extends WriterMacroOperation - case class UpdatePartial(tpe: TypeRepr, field: String, name: Expr[Option[String]], fun: Term, from: TypeRepr, to: TypeRepr) + case class Update( + tpe: TypeRepr, + field: String, + name: Expr[Option[String]], + fun: Term, + from: TypeRepr, + to: TypeRepr + ) extends WriterMacroOperation + case class UpdateFromRoot( + tpe: TypeRepr, + field: String, + name: Expr[Option[String]], + fun: Term, + to: TypeRepr + ) extends WriterMacroOperation + case class UpdatePartial( + tpe: TypeRepr, + field: String, + name: Expr[Option[String]], + fun: Term, + from: TypeRepr, + to: TypeRepr + ) extends WriterMacroOperation + case class UpdatePartialFromRoot( + tpe: TypeRepr, + field: String, + name: Expr[Option[String]], + fun: Term, + to: TypeRepr + ) extends WriterMacroOperation + case class Add(tpe: TypeRepr, field: Expr[String], fun: Term, to: TypeRepr) extends WriterMacroOperation - case class UpdatePartialFromRoot(tpe: TypeRepr, field: String, name: Expr[Option[String]], fun: Term, to: TypeRepr) - extends WriterMacroOperation - case class Add(tpe: TypeRepr, field: Expr[String], fun: Term, to: TypeRepr) extends WriterMacroOperation - def unlift[T: Type](bo: Expr[WriterDescription.BuilderOperation[T]]): WriterMacroOperation = + def unlift[T: Type]( + bo: Expr[WriterDescription.BuilderOperation[T]] + ): WriterMacroOperation = bo match { - case '{ WriterDescription.BuilderOperation.Remove.apply[tpe]($field) } => + case '{ + WriterDescription.BuilderOperation.Remove.apply[tpe]($field) + } => WriterMacroOperation.Remove(TypeRepr.of[tpe], field.valueOrAbort) - case '{ WriterDescription.BuilderOperation.Update.apply[tpe, from, to]($field, $name, $fun) } => + case '{ + WriterDescription.BuilderOperation.Update + .apply[tpe, from, to]($field, $name, $fun) + } => WriterMacroOperation.Update( TypeRepr.of[tpe], field.valueOrAbort, @@ -144,10 +207,22 @@ trait WriterBuilderUtils extends Reflection { TypeRepr.of[to] ) - case '{ WriterDescription.BuilderOperation.UpdateFromRoot.apply[tpe, to]($field, $name, $fun) } => - WriterMacroOperation.UpdateFromRoot(TypeRepr.of[tpe], field.valueOrAbort, name, fun.asTerm, TypeRepr.of[to]) + case '{ + WriterDescription.BuilderOperation.UpdateFromRoot + .apply[tpe, to]($field, $name, $fun) + } => + WriterMacroOperation.UpdateFromRoot( + TypeRepr.of[tpe], + field.valueOrAbort, + name, + fun.asTerm, + TypeRepr.of[to] + ) - case '{ WriterDescription.BuilderOperation.UpdatePartial.apply[tpe, from, to]($field, $name, $fun) } => + case '{ + WriterDescription.BuilderOperation.UpdatePartial + .apply[tpe, from, to]($field, $name, $fun) + } => WriterMacroOperation.UpdatePartial( tpe = TypeRepr.of[tpe], field = field.valueOrAbort, @@ -157,20 +232,39 @@ trait WriterBuilderUtils extends Reflection { to = TypeRepr.of[to] ) - case '{ WriterDescription.BuilderOperation.UpdatePartialFromRoot.apply[tpe, to]($field, $name, $fun) } => - WriterMacroOperation.UpdatePartialFromRoot(TypeRepr.of[tpe], field.valueOrAbort, name, fun.asTerm, TypeRepr.of[to]) + case '{ + WriterDescription.BuilderOperation.UpdatePartialFromRoot + .apply[tpe, to]($field, $name, $fun) + } => + WriterMacroOperation.UpdatePartialFromRoot( + TypeRepr.of[tpe], + field.valueOrAbort, + name, + fun.asTerm, + TypeRepr.of[to] + ) - case '{ WriterDescription.BuilderOperation.Add.apply[tpe, to]($field, $fun) } => - WriterMacroOperation.Add(TypeRepr.of[tpe], field, fun.asTerm, TypeRepr.of[to]) + case '{ + WriterDescription.BuilderOperation.Add + .apply[tpe, to]($field, $fun) + } => + WriterMacroOperation.Add( + TypeRepr.of[tpe], + field, + fun.asTerm, + TypeRepr.of[to] + ) } } - protected def evalWriterConfig(configExpr: Expr[WriterDerivationConfig]): (Option[FieldStyle], Option[String]) = { + protected def evalWriterConfig( + configExpr: Expr[WriterDerivationConfig] + ): (Option[FieldStyle], Option[String]) = { @tailrec def parseConfigExpr( - confExpr: Expr[WriterDerivationConfig], - fieldStyleExpr: Option[Expr[ConfigFieldStyle]], - discriminatorExpr: Option[Expr[String]] + confExpr: Expr[WriterDerivationConfig], + fieldStyleExpr: Option[Expr[ConfigFieldStyle]], + discriminatorExpr: Option[Expr[String]] ): (Option[Expr[ConfigFieldStyle]], Option[Expr[String]]) = confExpr match { case '{ WriterDerivationConfig.empty } => @@ -185,8 +279,16 @@ trait WriterBuilderUtils extends Reflection { case '{ WriterDerivationConfig.apply(Some($fieldStyle), None) } => (fieldStyleExpr.orElse(Some(fieldStyle)), discriminatorExpr) - case '{ WriterDerivationConfig.apply(Some($fieldStyle), Some($discriminator)) } => - (fieldStyleExpr.orElse(Some(fieldStyle)), discriminatorExpr.orElse(Some(discriminator))) + case '{ + WriterDerivationConfig.apply( + Some($fieldStyle), + Some($discriminator) + ) + } => + ( + fieldStyleExpr.orElse(Some(fieldStyle)), + discriminatorExpr.orElse(Some(discriminator)) + ) case '{ WriterDerivationConfig.withFieldStyle($fieldStyle) } => (fieldStyleExpr.orElse(Some(fieldStyle)), discriminatorExpr) @@ -194,16 +296,34 @@ trait WriterBuilderUtils extends Reflection { case '{ WriterDerivationConfig.withDiscriminator($discriminator) } => (fieldStyleExpr, discriminatorExpr.orElse(Some(discriminator))) - case '{ ($config: WriterDerivationConfig).withFieldStyle($fieldStyle) } => - parseConfigExpr(config, fieldStyleExpr.orElse(Some(fieldStyle)), discriminatorExpr) + case '{ + ($config: WriterDerivationConfig).withFieldStyle($fieldStyle) + } => + parseConfigExpr( + config, + fieldStyleExpr.orElse(Some(fieldStyle)), + discriminatorExpr + ) - case '{ ($config: WriterDerivationConfig).withDiscriminator($discriminator) } => - parseConfigExpr(config, fieldStyleExpr, discriminatorExpr.orElse(Some(discriminator))) + case '{ + ($config: WriterDerivationConfig).withDiscriminator( + $discriminator + ) + } => + parseConfigExpr( + config, + fieldStyleExpr, + discriminatorExpr.orElse(Some(discriminator)) + ) - case _ => report.errorAndAbort(s"Config parsing error. Unknown expr: ${confExpr.asTerm.show}") + case _ => + report.errorAndAbort( + s"Config parsing error. Unknown expr: ${confExpr.asTerm.show}" + ) } - val (fieldStyleExpr, discriminatorExpr) = parseConfigExpr(configExpr, None, None) + val (fieldStyleExpr, discriminatorExpr) = + parseConfigExpr(configExpr, None, None) val fieldStyle: Option[FieldStyle] = fieldStyleExpr.map { fs => fs.asTerm.underlying.asExprOf[ConfigFieldStyle] match { @@ -213,17 +333,21 @@ trait WriterBuilderUtils extends Reflection { case '{ ConfigFieldStyle.Capitalize } => FieldStyle.capitalize case '{ ConfigFieldStyle.Uncapitalize } => FieldStyle.uncapitalize - case '{ ConfigFieldStyle.KebabCase } => FieldStyle.kebabcase - case '{ ConfigFieldStyle.LowerKebabCase } => FieldStyle.lowerKebabcase - case '{ ConfigFieldStyle.UpperKebabCase } => FieldStyle.upperKebabcase - case '{ ConfigFieldStyle.CapitalizedKebabCase } => FieldStyle.capitalizedKebabCase - case '{ ConfigFieldStyle.UncapitalizedKebabCase } => FieldStyle.uncapitalizedKebabCase - - case '{ ConfigFieldStyle.SnakeCase } => FieldStyle.snakecase - case '{ ConfigFieldStyle.LowerSnakeCase } => FieldStyle.lowerSnakecase - case '{ ConfigFieldStyle.UpperSnakeCase } => FieldStyle.upperSnakecase - case '{ ConfigFieldStyle.CapitalizedSnakeCase } => FieldStyle.capitalizedSnakecase - case '{ ConfigFieldStyle.UncapitalizedSnakeCase } => FieldStyle.uncapitalizedSnakecase + case '{ ConfigFieldStyle.KebabCase } => FieldStyle.kebabcase + case '{ ConfigFieldStyle.LowerKebabCase } => FieldStyle.lowerKebabcase + case '{ ConfigFieldStyle.UpperKebabCase } => FieldStyle.upperKebabcase + case '{ ConfigFieldStyle.CapitalizedKebabCase } => + FieldStyle.capitalizedKebabCase + case '{ ConfigFieldStyle.UncapitalizedKebabCase } => + FieldStyle.uncapitalizedKebabCase + + case '{ ConfigFieldStyle.SnakeCase } => FieldStyle.snakecase + case '{ ConfigFieldStyle.LowerSnakeCase } => FieldStyle.lowerSnakecase + case '{ ConfigFieldStyle.UpperSnakeCase } => FieldStyle.upperSnakecase + case '{ ConfigFieldStyle.CapitalizedSnakeCase } => + FieldStyle.capitalizedSnakecase + case '{ ConfigFieldStyle.UncapitalizedSnakeCase } => + FieldStyle.uncapitalizedSnakecase case '{ ConfigFieldStyle.lowercase } => FieldStyle.lowercase case '{ ConfigFieldStyle.uppercase } => FieldStyle.uppercase @@ -234,7 +358,10 @@ trait WriterBuilderUtils extends Reflection { case '{ ConfigFieldStyle.lowerSnakecase } => FieldStyle.lowerSnakecase case '{ ConfigFieldStyle.upperSnakecase } => FieldStyle.upperSnakecase - case _ => report.errorAndAbort("fieldStyle in writer config can not be computed in compile-time") + case _ => + report.errorAndAbort( + "fieldStyle in writer config can not be computed in compile-time" + ) } } @@ -242,7 +369,11 @@ trait WriterBuilderUtils extends Reflection { _.asTerm.underlying .asExprOf[String] .value - .getOrElse(report.errorAndAbort("discriminator in writer config can not be computed in compile-time")) + .getOrElse( + report.errorAndAbort( + "discriminator in writer config can not be computed in compile-time" + ) + ) ) (fieldStyle, discriminator) diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterDescriptionMacro.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterDescriptionMacro.scala index 70d6c5d2..cbc7f6c9 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterDescriptionMacro.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/builder/WriterDescriptionMacro.scala @@ -7,7 +7,9 @@ import scala.quoted.* class WriterDescriptionMacro(val quotes: Quotes) extends WriterBuilderCommons { implicit val context: Quotes = quotes import context.reflect.* - - def simpleDescription[T <: Product : Type](builder: Expr[WriterBuilder[T]]): Expr[WriterDescription[T]] = + + def simpleDescription[T <: Product: Type]( + builder: Expr[WriterBuilder[T]] + ): Expr[WriterDescription[T]] = convertWriterBuilder[T](builder) } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/AutoDerivationMacro.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/AutoDerivationMacro.scala index bfb0b329..9d2e3776 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/AutoDerivationMacro.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/AutoDerivationMacro.scala @@ -13,7 +13,8 @@ class AutoDerivationMacro(val quotes: Quotes) import context.reflect.* // TODO: recursive A => B => A derivation check - def simpleJsonWriter[T: Type]: Expr[LowPriorityInstance[JsonObjectWriter[T]]] = { + def simpleJsonWriter[T: Type] + : Expr[LowPriorityInstance[JsonObjectWriter[T]]] = { val tpe: TypeRepr = TypeRepr.of[T] val tpeSym: Symbol = tpe.typeSymbol val description: MacroWriteDescription = MacroWriteDescription.empty[T] @@ -23,7 +24,9 @@ class AutoDerivationMacro(val quotes: Quotes) deriveCaseClassWriter[T](description) else if ( tpeSym.flags.is(Flags.Enum) || - (tpeSym.flags.is(Flags.Sealed) && (tpeSym.flags.is(Flags.Trait) || tpeSym.flags.is(Flags.Abstract))) + (tpeSym.flags.is(Flags.Sealed) && (tpeSym.flags.is( + Flags.Trait + ) || tpeSym.flags.is(Flags.Abstract))) ) deriveSealedClassWriter[T](description.config) else diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/ReaderDerivation.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/ReaderDerivation.scala index a519bb93..f1d73429 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/ReaderDerivation.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/ReaderDerivation.scala @@ -20,14 +20,18 @@ trait ReaderDerivation extends ReaderBuilderCommons { '{ new JsonReader[T] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): T = { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): T = { val actualValue = it.string() val expectedValue = $expectedValueExpr if (actualValue == expectedValue) ${ Ref(termSym).asExprOf[T] } else - ReaderError.wrongJson(s"expected value '$expectedValue', but actual is '$actualValue'") + ReaderError.wrongJson( + s"expected value '$expectedValue', but actual is '$actualValue'" + ) } } } @@ -39,30 +43,48 @@ trait ReaderDerivation extends ReaderBuilderCommons { val classesWithTheSameParams = children .filter(_.termSymbol.isNoSymbol) - .groupBy(_.typeSymbol.caseFields.map(fieldSym => (fieldSym.name, parentTpr.memberType(fieldSym)))) + .groupBy( + _.typeSymbol.caseFields.map(fieldSym => + (fieldSym.name, parentTpr.memberType(fieldSym)) + ) + ) .collect { case (_, tpes) if tpes.length > 1 => tpes.map(_.show) } if (classesWithTheSameParams.nonEmpty) report.errorAndAbort( s"""Can't derive reader for enum ${parentTpr.show}. Several classes has the same parameters: - | ${ classesWithTheSameParams.zipWithIndex.map { case (clss, i) => s"${i+1}) ${clss.mkString(", ")}" }.mkString("\n ")}""".stripMargin + | ${classesWithTheSameParams.zipWithIndex + .map { case (clss, i) => s"${i + 1}) ${clss.mkString(", ")}" } + .mkString("\n ")}""".stripMargin ) val childrenReadersExpr: Expr[List[JsonReader[?]]] = - Expr.ofList(children.map(_.searchInlineJsonReader.asExprOf[JsonReader[?]])) + Expr.ofList( + children.map(_.searchInlineJsonReader.asExprOf[JsonReader[?]]) + ) '{ new JsonReader[T] { private[this] implicit def thisReader: JsonReader[T] = this - override def read(it: TokenIterator)(implicit fieldName: FieldName): T = { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): T = { val curIt = it.collectExpression() val values = - $childrenReadersExpr.flatMap(childReader => scala.util.Try(childReader.read(curIt.copy())).toOption) + $childrenReadersExpr.flatMap(childReader => + scala.util.Try(childReader.read(curIt.copy())).toOption + ) values match { - case Nil => ReaderError.wrongJson(s"unexpected value for enum ${${ Expr(parentTpr.show) }}") + case Nil => + ReaderError.wrongJson( + s"unexpected value for enum ${${ Expr(parentTpr.show) }}" + ) case singleValue :: Nil => singleValue.asInstanceOf[T] - case _ => ReaderError.wrongJson(s"ambiguous value for enum ${${ Expr(parentTpr.show) }}") + case _ => + ReaderError.wrongJson( + s"ambiguous value for enum ${${ Expr(parentTpr.show) }}" + ) } } } @@ -70,7 +92,7 @@ trait ReaderDerivation extends ReaderBuilderCommons { } def deriveCaseClassReader[T: Type]( - description: MacroReaderDescription + description: MacroReaderDescription ): Expr[JsonReader[T]] = { val (fieldStyle, isStrict) = evalReaderConfig(description.config) @@ -92,36 +114,52 @@ trait ReaderDerivation extends ReaderBuilderCommons { } ) - val fieldsToReadFirstFromJson: List[String] = notSortedReaderFields.flatMap { - case SimpleField(name, _, _) => List(name) - case ExtractedField(_, _, args, _) => - args.collect { case FunctionArgument(Field.RawField(jsonName, _)) => jsonName } - case FromExtractedReader(_, _, _, args, _) => - args.collect { case FunctionArgument(Field.RawField(jsonName, _)) => jsonName } - }.distinct - val sortedReaderFields = sortFieldsByProcessing(fieldsToReadFirstFromJson, notSortedReaderFields) + val fieldsToReadFirstFromJson: List[String] = + notSortedReaderFields.flatMap { + case SimpleField(name, _, _) => List(name) + case ExtractedField(_, _, args, _) => + args.collect { case FunctionArgument(Field.RawField(jsonName, _)) => + jsonName + } + case FromExtractedReader(_, _, _, args, _) => + args.collect { case FunctionArgument(Field.RawField(jsonName, _)) => + jsonName + } + }.distinct + val sortedReaderFields = + sortFieldsByProcessing(fieldsToReadFirstFromJson, notSortedReaderFields) val typeReadersInfos = allocateTypeReadersInfos(notSortedReaderFields) val defaultValuesExpr = allocateDefaultValuesFromDefinition[T] - val possiblyNotInitializedExpr = allocateDefaultValuesForNotInitialized(sortedReaderFields) - val (readersExpr, fieldsWithoutReadersExpr) = allocateReadersExpr(sortedReaderFields, typeReadersInfos) + val possiblyNotInitializedExpr = allocateDefaultValuesForNotInitialized( + sortedReaderFields + ) + val (readersExpr, fieldsWithoutReadersExpr) = + allocateReadersExpr(sortedReaderFields, typeReadersInfos) '{ new JsonReader[T] { private[this] implicit def thisReader: JsonReader[T] = this - override def read(it: TokenIterator)(implicit fieldName: FieldName): T = { + override def read( + it: TokenIterator + )(implicit fieldName: FieldName): T = { if (!it.currentToken().isObjectStart) - ReaderError.wrongJson("Expected object start but found: " + it.currentToken().toString) + ReaderError.wrongJson( + "Expected object start but found: " + it.currentToken().toString + ) else { it.nextToken() - val readFields = new MutableMap[String, MutableMap[String, Any]].empty.withDefaultValue(MutableMap.empty) + val readFields = + new MutableMap[String, MutableMap[String, Any]].empty + .withDefaultValue(MutableMap.empty) val notComputedFields = new MutableMap[String, TokenIterator].empty val resultFields = new MutableMap[String, Any].empty val readers: Map[String, List[(String, String, JsonReader[?])]] = $readersExpr // jsonName -> (name, tpeName, reader) - val fieldsWithoutReaders: Set[String] = $fieldsWithoutReadersExpr // jsonNames + val fieldsWithoutReaders: Set[String] = + $fieldsWithoutReadersExpr // jsonNames while (!it.currentToken().isObjectEnd) { val jsonName = it.fieldName() @@ -131,14 +169,20 @@ trait ReaderDerivation extends ReaderBuilderCommons { readers .get(jsonName) .fold( - if (fieldsWithoutReaders.contains(jsonName)) notComputedFields.update(jsonName, currentIt) + if (fieldsWithoutReaders.contains(jsonName)) + notComputedFields.update(jsonName, currentIt) else if (${ Expr(isStrict) }) { val unexpectedName = jsonName - val expectedNames = readers.keySet.union(fieldsWithoutReaders).mkString("'", "', '", "'") - ReaderError.wrongJson(s"unexpected field '$unexpectedName', expected one of $expectedNames") + val expectedNames = readers.keySet + .union(fieldsWithoutReaders) + .mkString("'", "', '", "'") + ReaderError.wrongJson( + s"unexpected field '$unexpectedName', expected one of $expectedNames" + ) } )(_.foreach { case (name, tpeName, reader) => - val value: Any = reader.read(currentIt.copy())(fieldName.appendFieldName(jsonName)) + val value: Any = reader + .read(currentIt.copy())(fieldName.appendFieldName(jsonName)) readFields.updateWith(name) { case None => Some(MutableMap(tpeName -> value)) case Some(values) => Some(values.addOne(tpeName, value)) @@ -147,14 +191,23 @@ trait ReaderDerivation extends ReaderBuilderCommons { } it.nextToken() - $possiblyNotInitializedExpr.foreach { case (name, tpeName, defaultValue) => - readFields.getOrElseUpdate(name, MutableMap(tpeName -> defaultValue)) + $possiblyNotInitializedExpr.foreach { + case (name, tpeName, defaultValue) => + readFields.getOrElseUpdate( + name, + MutableMap(tpeName -> defaultValue) + ) } val fieldsNotReadFirstInJson: Set[String] = - Set.from(${ Varargs(fieldsToReadFirstFromJson.map(Expr(_))) }) -- readFields.keySet + Set.from( + ${ Varargs(fieldsToReadFirstFromJson.map(Expr(_))) } + ) -- readFields.keySet if (fieldsNotReadFirstInJson.nonEmpty) - ReaderError.wrongJson("Can not extract fields from json: " + fieldsNotReadFirstInJson.mkString(", ")) + ReaderError.wrongJson( + "Can not extract fields from json: " + fieldsNotReadFirstInJson + .mkString(", ") + ) ${ val readFieldsTerm = 'readFields.asTerm @@ -188,7 +241,8 @@ trait ReaderDerivation extends ReaderBuilderCommons { .selectFirstMethod("asInstanceOf") .appliedToType(arg.field.tpe) ) - val extractedFieldTerm = body.selectFirstMethod("apply").appliedToArgs(extractedArgs) + val extractedFieldTerm = + body.selectFirstMethod("apply").appliedToArgs(extractedArgs) val addToReadFieldsExpr = readFieldsTerm .selectFirstMethod("apply") .appliedTo(nameTerm) @@ -215,15 +269,21 @@ trait ReaderDerivation extends ReaderBuilderCommons { val jsonNameExpr = Expr(jsonName) val tpeNameExpr = Expr(tpe.getDealiasFullName) val extractedReaderExpr = - body.selectFirstMethod("apply").appliedToArgs(extractedArgs).asExprOf[JsonReader[?]] + body + .selectFirstMethod("apply") + .appliedToArgs(extractedArgs) + .asExprOf[JsonReader[?]] '{ notComputedFields .get($jsonNameExpr) .foreach { it => - val value: Any = $extractedReaderExpr.read(it)(fieldName.appendFieldName($jsonNameExpr)) + val value: Any = $extractedReaderExpr.read(it)( + fieldName.appendFieldName($jsonNameExpr) + ) readFields.updateWith($nameExpr) { - case None => Some(MutableMap($tpeNameExpr -> value)) - case Some(values) => Some(values.addOne($tpeNameExpr, value)) + case None => Some(MutableMap($tpeNameExpr -> value)) + case Some(values) => + Some(values.addOne($tpeNameExpr, value)) } resultFields.update($nameExpr, value) } @@ -237,21 +297,26 @@ trait ReaderDerivation extends ReaderBuilderCommons { } val notReadAfterExtractingFields: Set[String] = - Set.from(${ Varargs(classFields.map(field => Expr(field.name))) }) -- resultFields.keySet + Set.from( + ${ Varargs(classFields.map(field => Expr(field.name))) } + ) -- resultFields.keySet if (notReadAfterExtractingFields.nonEmpty) ReaderError.wrongJson( - "Can not extract fields: " + notReadAfterExtractingFields.mkString(", ") + "Can not extract fields: " + notReadAfterExtractingFields + .mkString(", ") ) ${ - val paramsInfo = classFields.map(param => (param.name, tpr.memberType(param))) - - val fields: List[Term] = paramsInfo.map { case (paramName, paramType) => - 'resultFields.asTerm - .selectFirstMethod("apply") - .appliedTo(Expr(paramName).asTerm) - .selectFirstMethod("asInstanceOf") - .appliedToType(paramType) + val paramsInfo = + classFields.map(param => (param.name, tpr.memberType(param))) + + val fields: List[Term] = paramsInfo.map { + case (paramName, paramType) => + 'resultFields.asTerm + .selectFirstMethod("apply") + .appliedTo(Expr(paramName).asTerm) + .selectFirstMethod("asInstanceOf") + .appliedToType(paramType) } New(tpt) @@ -294,30 +359,40 @@ trait ReaderDerivation extends ReaderBuilderCommons { } val startQueue = fieldsToReadFirstFromJson - val notInQueue = readerFields.filterNot(field => startQueue.contains(field.name)) + val notInQueue = + readerFields.filterNot(field => startQueue.contains(field.name)) val fieldsQueueToProcessing = go(notInQueue, startQueue) - fieldsQueueToProcessing.flatMap(fieldName => readerFields.find(_.name == fieldName)) + fieldsQueueToProcessing.flatMap(fieldName => + readerFields.find(_.name == fieldName) + ) } - private def applyFieldStyle(fieldStyle: Option[FieldStyle]): List[SimpleField] => List[SimpleField] = readerFields => + private def applyFieldStyle( + fieldStyle: Option[FieldStyle] + ): List[SimpleField] => List[SimpleField] = readerFields => fieldStyle.fold(readerFields)(style => - readerFields.map(field => field.copy(jsonName = style.applyStyle(field.jsonName))) + readerFields.map(field => + field.copy(jsonName = style.applyStyle(field.jsonName)) + ) ) private def allocateDefaultValuesForNotInitialized( - readerFields: List[ReaderField] + readerFields: List[ReaderField] ): Expr[List[(String, String, Any)]] = { val fieldInfos = readerFields.flatMap { - case f: SimpleField => List(f.name -> f.tpe) - case f: ExtractedField => f.args.map(arg => arg.field.name -> arg.field.tpe) - case f: FromExtractedReader => f.args.map(arg => arg.field.name -> arg.field.tpe) + case f: SimpleField => List(f.name -> f.tpe) + case f: ExtractedField => + f.args.map(arg => arg.field.name -> arg.field.tpe) + case f: FromExtractedReader => + f.args.map(arg => arg.field.name -> arg.field.tpe) } val res = fieldInfos.flatMap { case (name, tpe) => tpe.asType match { case '[jrdvTpe] => - tpe.searchJsonReaderDefaultValue.asExprOf[JsonReaderDefaultValue[jrdvTpe]] match { + tpe.searchJsonReaderDefaultValue + .asExprOf[JsonReaderDefaultValue[jrdvTpe]] match { case '{ JsonReaderDefaultValue.noDefaultValue[jrdvTpe] } => None case jrdv => Some( @@ -337,16 +412,32 @@ trait ReaderDerivation extends ReaderBuilderCommons { } private def allocateReadersExpr( - readerFields: List[ReaderField], - readers: List[(TypeRepr, Term)] - ): (Expr[Map[String, List[(String, String, JsonReader[?])]]], Expr[Set[String]]) = { - case class FieldDef(name: String, jsonName: String, tpeFullName: String, reader: Term) + readerFields: List[ReaderField], + readers: List[(TypeRepr, Term)] + ): ( + Expr[Map[String, List[(String, String, JsonReader[?])]]], + Expr[Set[String]] + ) = { + case class FieldDef( + name: String, + jsonName: String, + tpeFullName: String, + reader: Term + ) - def findReader(tpe: TypeRepr): Term = readers.find(_._1 =:= tpe.widen).get._2 + def findReader(tpe: TypeRepr): Term = + readers.find(_._1 =:= tpe.widen).get._2 val fieldDefs: List[FieldDef] = readerFields.flatMap { case f: SimpleField => - List(FieldDef(f.name, f.jsonName, f.tpe.getDealiasFullName, findReader(f.tpe))) + List( + FieldDef( + f.name, + f.jsonName, + f.tpe.getDealiasFullName, + findReader(f.tpe) + ) + ) case f: ExtractedField => f.args.collect { case FunctionArgument(Field.RawField(jsonName, tpe)) => FieldDef(jsonName, jsonName, tpe.getDealiasFullName, findReader(tpe)) @@ -364,20 +455,30 @@ trait ReaderDerivation extends ReaderBuilderCommons { val groupedDefs = fieldDefs.distinct.groupBy(_.jsonName).toList val res = groupedDefs.map { case (jsonName, defs) => - val readersInfoExpr: Expr[List[(String, String, JsonReader[?])]] = Expr.ofList( - defs.map { fieldDef => - Expr.ofTuple((Expr(fieldDef.name), Expr(fieldDef.tpeFullName), fieldDef.reader.asExprOf[JsonReader[?]])) - } - ) + val readersInfoExpr: Expr[List[(String, String, JsonReader[?])]] = + Expr.ofList( + defs.map { fieldDef => + Expr.ofTuple( + ( + Expr(fieldDef.name), + Expr(fieldDef.tpeFullName), + fieldDef.reader.asExprOf[JsonReader[?]] + ) + ) + } + ) Expr.ofTuple(Expr(jsonName) -> readersInfoExpr) } val readersExpr = '{ Map(${ Varargs(res) }: _*) } - val fieldsWithoutReadersExpr = '{ Set(${ Varargs(fieldsWithoutReaders) }: _*) } + val fieldsWithoutReadersExpr = '{ + Set(${ Varargs(fieldsWithoutReaders) }: _*) + } (readersExpr, fieldsWithoutReadersExpr) } - private def allocateDefaultValuesFromDefinition[T: Type]: Expr[Map[String, Any]] = { + private def allocateDefaultValuesFromDefinition[T: Type] + : Expr[Map[String, Any]] = { val tpe = TypeRepr.of[T] val res = tpe.typeSymbol.caseFields.flatMap { @@ -388,7 +489,9 @@ trait ReaderDerivation extends ReaderBuilderCommons { val defaultValueMethodSym = comp - .declaredMethod(s"$$lessinit$$greater$$default$$$indexOfDefaultValueMethod") // $$default$1 + .declaredMethod( + s"$$lessinit$$greater$$default$$$indexOfDefaultValueMethod" + ) // $$default$1 .headOption .getOrElse( report.errorAndAbort( @@ -404,7 +507,9 @@ trait ReaderDerivation extends ReaderBuilderCommons { '{ Map(${ Varargs(res) }: _*) } } - private def allocateTypeReadersInfos(readerFields: List[ReaderField]): List[(TypeRepr, Term)] = { + private def allocateTypeReadersInfos( + readerFields: List[ReaderField] + ): List[(TypeRepr, Term)] = { val jsonTypes = readerFields.flatMap { case f: SimpleField => List(f.tpe) case f: ExtractedField => f.args.map(_.field.tpe) @@ -419,22 +524,28 @@ trait ReaderDerivation extends ReaderBuilderCommons { } private def applyDescriptionOperations( - operations: Seq[ReaderMacroOperation] + operations: Seq[ReaderMacroOperation] ): List[ReaderField] => List[ReaderField] = readerFields => { - def mapField(fields: List[ReaderField], name: String)(f: SimpleField => ReaderField): List[ReaderField] = { + def mapField(fields: List[ReaderField], name: String)( + f: SimpleField => ReaderField + ): List[ReaderField] = { fields.map { case field: SimpleField if field.name == name => f(field) case field => field } } - def buildArgument(field: Field, readerFields: List[ReaderField]): FunctionArgument = { + def buildArgument( + field: Field, + readerFields: List[ReaderField] + ): FunctionArgument = { field match { case Field.ClassField(name, _) => readerFields.collectFirst { - case f: SimpleField if f.name == name => FunctionArgument(field) - case f: ExtractedField if f.name == name => FunctionArgument(field) - case f: FromExtractedReader if f.name == name => FunctionArgument(field) + case f: SimpleField if f.name == name => FunctionArgument(field) + case f: ExtractedField if f.name == name => FunctionArgument(field) + case f: FromExtractedReader if f.name == name => + FunctionArgument(field) }.head case Field.RawField(name, tpe) => val possibleArg = readerFields.flatMap { @@ -442,18 +553,22 @@ trait ReaderDerivation extends ReaderBuilderCommons { List(FunctionArgument(field)) case f: ExtractedField => f.args.collectFirst { - case arg @ FunctionArgument(rf: Field.RawField) if rf.name == name && rf.tpe =:= tpe => + case arg @ FunctionArgument(rf: Field.RawField) + if rf.name == name && rf.tpe =:= tpe => arg } case f: FromExtractedReader => f.args.collectFirst { - case arg @ FunctionArgument(rf: Field.RawField) if rf.name == name && rf.tpe =:= tpe => + case arg @ FunctionArgument(rf: Field.RawField) + if rf.name == name && rf.tpe =:= tpe => arg } case _ => List.empty[FunctionArgument] } - possibleArg.headOption.getOrElse(FunctionArgument(field = Field.RawField(name, tpe))) + possibleArg.headOption.getOrElse( + FunctionArgument(field = Field.RawField(name, tpe)) + ) } } @@ -464,7 +579,8 @@ trait ReaderDerivation extends ReaderBuilderCommons { ExtractedField( name = field, tpe = tpe, - args = List(FunctionArgument(field = Field.RawField(f.jsonName, as))), + args = + List(FunctionArgument(field = Field.RawField(f.jsonName, as))), body = fun ) ) @@ -495,10 +611,15 @@ trait ReaderDerivation extends ReaderBuilderCommons { val name: String val jsonName: String } - private case class SimpleField(name: String, tpe: TypeRepr, jsonName: String) extends ReaderField + private case class SimpleField(name: String, tpe: TypeRepr, jsonName: String) + extends ReaderField - private case class ExtractedField(name: String, tpe: TypeRepr, args: List[FunctionArgument], body: Term) - extends ReaderField { + private case class ExtractedField( + name: String, + tpe: TypeRepr, + args: List[FunctionArgument], + body: Term + ) extends ReaderField { val jsonName: String = name } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala index 3d2a1093..476ca9e4 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/SemiautoDerivationMacro.scala @@ -9,14 +9,18 @@ import tethys.readers.tokens.TokenIterator import tethys.{JsonObjectWriter, JsonReader, JsonWriter} import tethys.writers.tokens.TokenWriter -class SemiautoDerivationMacro(val quotes: Quotes) extends WriterDerivation with ReaderDerivation { +class SemiautoDerivationMacro(val quotes: Quotes) + extends WriterDerivation + with ReaderDerivation { implicit val context: Quotes = quotes import context.reflect.* def simpleJsonWriter[T: Type]: Expr[JsonObjectWriter[T]] = jsonWriterWithMacroWriteDescription[T](MacroWriteDescription.empty[T]) - def jsonWriterWithConfig[T: Type](config: Expr[WriterDerivationConfig]): Expr[JsonObjectWriter[T]] = { + def jsonWriterWithConfig[T: Type]( + config: Expr[WriterDerivationConfig] + ): Expr[JsonObjectWriter[T]] = { val tpe = TypeRepr.of[T] val description = MacroWriteDescription( @@ -28,7 +32,9 @@ class SemiautoDerivationMacro(val quotes: Quotes) extends WriterDerivation with jsonWriterWithMacroWriteDescription[T](description) } - def jsonWriterWithMacroWriteDescription[T: Type](description: MacroWriteDescription): Expr[JsonObjectWriter[T]] = { + def jsonWriterWithMacroWriteDescription[T: Type]( + description: MacroWriteDescription + ): Expr[JsonObjectWriter[T]] = { val tpe = TypeRepr.of[T] if (tpe.termSymbol.isNoSymbol) { @@ -36,27 +42,37 @@ class SemiautoDerivationMacro(val quotes: Quotes) extends WriterDerivation with if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) deriveCaseClassWriter[T](description) - else if (tpeSym.flags.is(Flags.Enum) || (tpeSym.flags.is(Flags.Sealed) && (tpeSym.flags.is(Flags.Trait) || tpeSym.flags.is(Flags.Abstract)))) + else if ( + tpeSym.flags.is(Flags.Enum) || (tpeSym.flags.is( + Flags.Sealed + ) && (tpeSym.flags.is(Flags.Trait) || tpeSym.flags.is(Flags.Abstract))) + ) deriveSealedClassWriter[T](description.config) else report.errorAndAbort( s"Can't auto derive json writer! ${tpe.show} isn't a Case Class, Sealed Trait, Sealed Abstract Class or Enum" ) - } - else deriveTermWriter[T] + } else deriveTermWriter[T] } - def jsonWriterWithBuilder[T <: Product: Type](builder: Expr[WriterBuilder[T]]): Expr[JsonObjectWriter[T]] = { + def jsonWriterWithBuilder[T <: Product: Type]( + builder: Expr[WriterBuilder[T]] + ): Expr[JsonObjectWriter[T]] = { val description = convertWriterBuilder[T](builder) jsonWriterWithWriterDescription[T](description) } - def jsonWriterWithWriterDescription[T: Type](description: Expr[WriterDescription[T]]): Expr[JsonObjectWriter[T]] = { + def jsonWriterWithWriterDescription[T: Type]( + description: Expr[WriterDescription[T]] + ): Expr[JsonObjectWriter[T]] = { val tpe = TypeRepr.of[T] val tpeSym = tpe.typeSymbol if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) deriveCaseClassWriter[T](MacroWriteDescription.unlift(description)) - else report.errorAndAbort(s"Can't derive json writer! ${tpe.show} isn't a Case Class") + else + report.errorAndAbort( + s"Can't derive json writer! ${tpe.show} isn't a Case Class" + ) } def simpleJsonReader[T: Type]: Expr[JsonReader[T]] = { @@ -67,7 +83,9 @@ class SemiautoDerivationMacro(val quotes: Quotes) extends WriterDerivation with jsonReaderWithMacroReaderDescription[T](description) } - def jsonReaderWithConfig[T: Type](config: Expr[ReaderDerivationConfig]): Expr[JsonReader[T]] = { + def jsonReaderWithConfig[T: Type]( + config: Expr[ReaderDerivationConfig] + ): Expr[JsonReader[T]] = { val description = MacroReaderDescription( config = config, operations = Seq() @@ -76,7 +94,9 @@ class SemiautoDerivationMacro(val quotes: Quotes) extends WriterDerivation with jsonReaderWithMacroReaderDescription[T](description) } - def jsonReaderWithMacroReaderDescription[T: Type](description: MacroReaderDescription): Expr[JsonReader[T]] = { + def jsonReaderWithMacroReaderDescription[T: Type]( + description: MacroReaderDescription + ): Expr[JsonReader[T]] = { val tpe = TypeRepr.of[T] val tpeSym = tpe.typeSymbol @@ -86,22 +106,29 @@ class SemiautoDerivationMacro(val quotes: Quotes) extends WriterDerivation with else if (tpeSym.flags.is(Flags.Enum | Flags.Abstract)) deriveEnumReader[T] else - report.errorAndAbort(s"Can't derive json reader! '${tpe.show}' isn't a Case Class") - } - else deriveTermReader[T] + report.errorAndAbort( + s"Can't derive json reader! '${tpe.show}' isn't a Case Class" + ) + } else deriveTermReader[T] } - def jsonReaderWithBuilder[T <: Product: Type](builder: Expr[ReaderBuilder[T]]): Expr[JsonReader[T]] = { + def jsonReaderWithBuilder[T <: Product: Type]( + builder: Expr[ReaderBuilder[T]] + ): Expr[JsonReader[T]] = { val description = convertReaderBuilder[T](builder) jsonReaderWithReaderDescription[T](description) } - def jsonReaderWithReaderDescription[T: Type](description: Expr[ReaderDescription[T]]): Expr[JsonReader[T]] = { + def jsonReaderWithReaderDescription[T: Type]( + description: Expr[ReaderDescription[T]] + ): Expr[JsonReader[T]] = { val tpe = TypeRepr.of[T] val tpeSym = tpe.typeSymbol if (tpeSym.isClassDef && tpeSym.flags.is(Flags.Case)) deriveCaseClassReader[T](MacroReaderDescription.unlift(description)) else - report.errorAndAbort(s"Can't derive json reader! '${tpe.show}' isn't a Case Class") + report.errorAndAbort( + s"Can't derive json reader! '${tpe.show}' isn't a Case Class" + ) } } diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/WriterDerivation.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/WriterDerivation.scala index 47f1b36b..88e48c75 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/WriterDerivation.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/impl/derivation/WriterDerivation.scala @@ -16,28 +16,46 @@ trait WriterDerivation extends WriterBuilderCommons { // ---------------------------------- CASE CLASS ---------------------------------- def deriveCaseClassWriter[T: Type]( - description: MacroWriteDescription + description: MacroWriteDescription ): Expr[JsonObjectWriter[T]] = { val (fieldStyle, _) = evalWriterConfig(description.config) val caseClassTpe: TypeRepr = TypeRepr.of[T] val defaultFieldsToTpesMap: Map[String, List[TypeRepr]] = Map.from { - caseClassTpe.typeSymbol.caseFields.map(sym => sym.name -> List(caseClassTpe.memberType(sym))) + caseClassTpe.typeSymbol.caseFields.map(sym => + sym.name -> List(caseClassTpe.memberType(sym)) + ) } - val allTpes: List[TypeRepr] = collectAllNecessaryTypes(defaultFieldsToTpesMap, description.operations.toList) - val (nonCaseClassTpes, caseClassTpes) = allTpes.partition(_.typeSymbol.caseFields.isEmpty) + val allTpes: List[TypeRepr] = collectAllNecessaryTypes( + defaultFieldsToTpesMap, + description.operations.toList + ) + val (nonCaseClassTpes, caseClassTpes) = + allTpes.partition(_.typeSymbol.caseFields.isEmpty) def collectClsDecls(clsSym: Symbol): List[Symbol] = createThisWriterSym(clsSym, caseClassTpe) +: - allTpes.zipWithIndex.map { case (tpe, i) => createInnerWriterSym(clsSym, tpe.wrappedTo[JsonWriter], i) } :+ - createWriteValuesMethodSym(clsSym, name = "writeValues", tpe = caseClassTpe) + allTpes.zipWithIndex.map { case (tpe, i) => + createInnerWriterSym(clsSym, tpe.wrappedTo[JsonWriter], i) + } :+ + createWriteValuesMethodSym( + clsSym, + name = "writeValues", + tpe = caseClassTpe + ) val clsSym: Symbol = createClsSym(caseClassTpe, collectClsDecls) - val thisWriterValDef: ValDef = ValDef(symbol = clsSym.declaredField("thisWriter"), rhs = Some(This(clsSym))) + val thisWriterValDef: ValDef = ValDef( + symbol = clsSym.declaredField("thisWriter"), + rhs = Some(This(clsSym)) + ) - val tpeTermPairs: List[(TypeRepr, Term)] = createNonCaseClassWriterTerms(nonCaseClassTpes) ++ createCaseClassWriterTerms(caseClassTpes) - val innerWriterDefs: List[ValDef] = createInnerWriterDefs(clsSym, tpeTermPairs) + val tpeTermPairs: List[(TypeRepr, Term)] = createNonCaseClassWriterTerms( + nonCaseClassTpes + ) ++ createCaseClassWriterTerms(caseClassTpes) + val innerWriterDefs: List[ValDef] = + createInnerWriterDefs(clsSym, tpeTermPairs) val writeValuesMethodDef: DefDef = createWriteValuesMethodDef[T]( symbol = clsSym.declaredMethod("writeValues").head, @@ -46,24 +64,32 @@ trait WriterDerivation extends WriterBuilderCommons { writerDefs = innerWriterDefs ) - val derivedWriterClsParents: List[TypeTree] = List(TypeTree.of[Object], TypeTree.of[JsonObjectWriter[T]]) - val clsBody: List[Statement] = thisWriterValDef +: innerWriterDefs :+ writeValuesMethodDef + val derivedWriterClsParents: List[TypeTree] = + List(TypeTree.of[Object], TypeTree.of[JsonObjectWriter[T]]) + val clsBody: List[Statement] = + thisWriterValDef +: innerWriterDefs :+ writeValuesMethodDef createDerivedWriterExpr[T](clsSym, derivedWriterClsParents, clsBody) } - private def createInnerWriterDefs(clsSym: Symbol, tpeTermPairs: List[(TypeRepr, Term)]): List[ValDef] = + private def createInnerWriterDefs( + clsSym: Symbol, + tpeTermPairs: List[(TypeRepr, Term)] + ): List[ValDef] = tpeTermPairs.flatMap { case (tpe, writerTerm) => - clsSym.declaredFields.find(tpe.memberType(_).widen <:< tpe).fold(List.empty) { writerSym => - ValDef(symbol = writerSym, rhs = Some(writerTerm)) :: Nil - } + clsSym.declaredFields + .find(tpe.memberType(_).widen <:< tpe) + .fold(List.empty) { writerSym => + ValDef(symbol = writerSym, rhs = Some(writerTerm)) :: Nil + } } private def createDerivedWriterExpr[T: Type]( - clsSym: Symbol, - clsParents: List[Tree], - clsBody: List[Statement] + clsSym: Symbol, + clsParents: List[Tree], + clsBody: List[Statement] ): Expr[JsonObjectWriter[T]] = { - val derivedWriterClassDef: ClassDef = ClassDef(cls = clsSym, parents = clsParents, body = clsBody) + val derivedWriterClassDef: ClassDef = + ClassDef(cls = clsSym, parents = clsParents, body = clsBody) val derivedWriterInstance: Typed = Typed( expr = Apply( fun = Select(New(TypeIdent(clsSym)), clsSym.primaryConstructor), @@ -72,12 +98,13 @@ trait WriterDerivation extends WriterBuilderCommons { tpt = TypeTree.of[JsonObjectWriter[T]] ) - Block(stats = List(derivedWriterClassDef), expr = derivedWriterInstance).asExprOf[JsonObjectWriter[T]] + Block(stats = List(derivedWriterClassDef), expr = derivedWriterInstance) + .asExprOf[JsonObjectWriter[T]] } private def collectAllNecessaryTypes( - defaultTpes: Map[String, List[TypeRepr]], - operations: List[WriterMacroOperation] + defaultTpes: Map[String, List[TypeRepr]], + operations: List[WriterMacroOperation] ): List[TypeRepr] = { def searchAdditionalTypes(tpe: TypeRepr): List[TypeRepr] = { @tailrec @@ -95,8 +122,8 @@ trait WriterDerivation extends WriterBuilderCommons { loop(acc = Nil, unchecked = tpe :: Nil) } - val allFieldsToTpesMap: Map[String, List[TypeRepr]] = operations.foldLeft(defaultTpes) { - case (fieldToTpesMap, operation) => + val allFieldsToTpesMap: Map[String, List[TypeRepr]] = + operations.foldLeft(defaultTpes) { case (fieldToTpesMap, operation) => operation match case op: WriterMacroOperation.Remove => fieldToTpesMap - op.field @@ -109,36 +136,45 @@ trait WriterDerivation extends WriterBuilderCommons { case op: WriterMacroOperation.UpdatePartialFromRoot => fieldToTpesMap + (op.field -> searchAdditionalTypes(op.to)) case op: WriterMacroOperation.Add => - fieldToTpesMap + (op.field.value.get -> searchAdditionalTypes(op.to)) - } + fieldToTpesMap + (op.field.value.get -> searchAdditionalTypes( + op.to + )) + } allFieldsToTpesMap.values.toList.flatten.distinctBy(_.show) } - private def createNonCaseClassWriterTerms(tpes: List[TypeRepr]): List[(TypeRepr, Term)] = + private def createNonCaseClassWriterTerms( + tpes: List[TypeRepr] + ): List[(TypeRepr, Term)] = tpes.foldLeft(List.empty) { case (rest, fieldTpe) if !rest.exists(_._1 <:< fieldTpe.widen) => val writerTpe: TypeRepr = fieldTpe.wrappedTo[JsonWriter] - val writerTerm: Term = fieldTpe.createWriterTerm(_.searchInlineJsonWriter) + val writerTerm: Term = + fieldTpe.createWriterTerm(_.searchInlineJsonWriter) rest :+ (writerTpe, writerTerm) case (rest, _) => rest } - private def createCaseClassWriterTerms(tpes: List[TypeRepr]): List[(TypeRepr, Term)] = + private def createCaseClassWriterTerms( + tpes: List[TypeRepr] + ): List[(TypeRepr, Term)] = tpes.map { _.asType match { case '[t] => - def derivedWriter: Expr[JsonWriter[t]] = deriveCaseClassWriter[t](MacroWriteDescription.empty[t]) - val writerTerm: Term = Expr.summon[JsonWriter[t]].getOrElse(derivedWriter).asTerm + def derivedWriter: Expr[JsonWriter[t]] = + deriveCaseClassWriter[t](MacroWriteDescription.empty[t]) + val writerTerm: Term = + Expr.summon[JsonWriter[t]].getOrElse(derivedWriter).asTerm TypeRepr.of[JsonWriter[t]] -> writerTerm } } private def createWriteValuesMethodDef[T: Type]( - symbol: Symbol, - fieldStyle: Option[FieldStyle], - operations: Seq[WriterMacroOperation], - writerDefs: List[ValDef] + symbol: Symbol, + fieldStyle: Option[FieldStyle], + operations: Seq[WriterMacroOperation], + writerDefs: List[ValDef] ): DefDef = DefDef( symbol = symbol, @@ -149,7 +185,8 @@ trait WriterDerivation extends WriterBuilderCommons { val writerFields: List[WriterField] = applyFieldStyle(fieldStyle) .andThen(applyDescriptionOperations(valueTerm, operations)) .apply(makeFields[T](valueTerm)) - val stats: List[Statement] = createWriterStatements(writerFields, writerDefs, tokenWriterTerm) + val stats: List[Statement] = + createWriterStatements(writerFields, writerDefs, tokenWriterTerm) Block(stats, expr = '{ () }.asTerm) } @@ -158,20 +195,25 @@ trait WriterDerivation extends WriterBuilderCommons { } ) - private def applyFieldStyle(fieldStyle: Option[FieldStyle]): List[WriterField] => List[WriterField] = + private def applyFieldStyle( + fieldStyle: Option[FieldStyle] + ): List[WriterField] => List[WriterField] = writerFields => fieldStyle.fold(writerFields) { style => writerFields.map { - case field: SimpleWriterField => field.copy(jsonName = Expr(style.applyStyle(field.name))) + case field: SimpleWriterField => + field.copy(jsonName = Expr(style.applyStyle(field.name))) case field => field } } private def applyDescriptionOperations( - valueTerm: Term, - operations: Seq[WriterMacroOperation] + valueTerm: Term, + operations: Seq[WriterMacroOperation] ): List[WriterField] => List[WriterField] = writerFields => { - def mapField(fields: List[WriterField], name: String)(f: SimpleWriterField => WriterField): List[WriterField] = + def mapField(fields: List[WriterField], name: String)( + f: SimpleWriterField => WriterField + ): List[WriterField] = fields.map { case field: SimpleWriterField if field.name == name => f(field) case field => field @@ -224,7 +266,13 @@ trait WriterDerivation extends WriterBuilderCommons { ) ) - case WriterMacroOperation.UpdatePartialFromRoot(_, field, name, fun, _) => + case WriterMacroOperation.UpdatePartialFromRoot( + _, + field, + name, + fun, + _ + ) => mapField(fields, field)(f => PartialExtractedField( name = field, @@ -266,34 +314,39 @@ trait WriterDerivation extends WriterBuilderCommons { } private def createWriterStatements( - writerFields: List[WriterField], - writerDefs: List[ValDef], - tokenWriterTerm: Term + writerFields: List[WriterField], + writerDefs: List[ValDef], + tokenWriterTerm: Term ): List[Statement] = writerFields.map { case SimpleWriterField(_, jsonName, fieldTpe, extractor) => - getWriterDefRef(writerDefs, fieldTpe) - .selectWrite3Method + getWriterDefRef(writerDefs, fieldTpe).selectWrite3Method .appliedTo(jsonName.asTerm, getValueTerm(extractor), tokenWriterTerm) case PartialExtractedField(_, jsonName, argExtractor, cases) => - val newCases: List[CaseDef] = cases.map { case CaseDef(pattern, guard, rhs) => - val writerTerm: Term = rhs.tpe.widen.createWriterTerm(getWriterDefRef(writerDefs, _)) - val newRhs: Term = writerTerm - .selectWrite3Method - .appliedTo(jsonName.asTerm, rhs, tokenWriterTerm) - CaseDef(pattern, guard, rhs = newRhs) + val newCases: List[CaseDef] = cases.map { + case CaseDef(pattern, guard, rhs) => + val writerTerm: Term = + rhs.tpe.widen.createWriterTerm(getWriterDefRef(writerDefs, _)) + val newRhs: Term = writerTerm.selectWrite3Method + .appliedTo(jsonName.asTerm, rhs, tokenWriterTerm) + CaseDef(pattern, guard, rhs = newRhs) } Match(selector = getValueTerm(argExtractor), cases = newCases) } - private def getWriterDefRef(writerDefs: List[ValDef], fieldTpe: TypeRepr): Ref = { + private def getWriterDefRef( + writerDefs: List[ValDef], + fieldTpe: TypeRepr + ): Ref = { val fieldWriterTpe: TypeRepr = fieldTpe.wrappedTo[JsonWriter] - val reqWriter: ValDef = writerDefs.find(_.tpt.tpe <:< fieldWriterTpe).getOrElse { - report.errorAndAbort( - s"Writer for type ${fieldTpe.show} hasn't been found between writer definitions: ${writerDefs.map(_.show)}" - ) - } + val reqWriter: ValDef = + writerDefs.find(_.tpt.tpe <:< fieldWriterTpe).getOrElse { + report.errorAndAbort( + s"Writer for type ${fieldTpe.show} hasn't been found between writer definitions: ${writerDefs + .map(_.show)}" + ) + } Ref(reqWriter.symbol) } @@ -306,61 +359,86 @@ trait WriterDerivation extends WriterBuilderCommons { // -------------------- SEALED (TRAIT | ABSTRACT CLASS) OR ENUM ------------------- def deriveSealedClassWriter[T: Type]( - cfg: Expr[WriterDerivationConfig] + cfg: Expr[WriterDerivationConfig] ): Expr[JsonObjectWriter[T]] = { val parentTpe: TypeRepr = TypeRepr.of[T] val isSameTypeWriterExists: Boolean = Expr.summon[JsonWriter[T]].nonEmpty val (_, discriminator) = evalWriterConfig(cfg) - val childTpes: List[TypeRepr] = collectDistinctSubtypes(parentTpe).sortBy(_.typeSymbol.fullName) + val childTpes: List[TypeRepr] = + collectDistinctSubtypes(parentTpe).sortBy(_.typeSymbol.fullName) if (childTpes.isEmpty) report.errorAndAbort(s"${parentTpe.show} has no known direct subclasses") def collectClsDecls(clsSym: Symbol): List[Symbol] = - (if (isSameTypeWriterExists) Nil else List(createThisWriterSym(clsSym, parentTpe))) ::: + (if (isSameTypeWriterExists) Nil + else List(createThisWriterSym(clsSym, parentTpe))) ::: childTpes.zipWithIndex.map { case (tpe, i) => createInnerWriterSym(clsSym, tpe.wrappedTo[JsonObjectWriter], i) } ::: List( createWriteValuesMethodSym(clsSym, name = "write", tpe = parentTpe), - createWriteValuesMethodSym(clsSym, name = "writeValues", tpe = parentTpe) + createWriteValuesMethodSym( + clsSym, + name = "writeValues", + tpe = parentTpe + ) ) val clsSym: Symbol = createClsSym(parentTpe, collectClsDecls) val writeMethodDefSym: Symbol = clsSym.declaredMethod("write").head - val writeValuesMethodDefSym: Symbol = clsSym.declaredMethod("writeValues").head + val writeValuesMethodDefSym: Symbol = + clsSym.declaredMethod("writeValues").head - lazy val thisWriterDef: ValDef = ValDef(symbol = clsSym.declaredField("thisWriter"), rhs = Some(This(clsSym))) + lazy val thisWriterDef: ValDef = ValDef( + symbol = clsSym.declaredField("thisWriter"), + rhs = Some(This(clsSym)) + ) - val tpeTermPairs: List[(TypeRepr, Term)] = createWriterTpeTermPairs(childTpes) - val innerWriterDefs: List[ValDef] = createInnerWriterDefs(clsSym, tpeTermPairs) + val tpeTermPairs: List[(TypeRepr, Term)] = createWriterTpeTermPairs( + childTpes + ) + val innerWriterDefs: List[ValDef] = + createInnerWriterDefs(clsSym, tpeTermPairs) - val writeMethodDef: DefDef = createSealedWriteMethodDef[T](writeMethodDefSym, childTpes, writeValuesMethodDefSym) + val writeMethodDef: DefDef = createSealedWriteMethodDef[T]( + writeMethodDefSym, + childTpes, + writeValuesMethodDefSym + ) val writeValuesMethodDef: DefDef = createSealedWriteValuesMethodDef[T]( - writeValuesMethodDefSym, childTpes, innerWriterDefs, discriminator + writeValuesMethodDefSym, + childTpes, + innerWriterDefs, + discriminator ) - val derivedWriterClsParents: List[TypeTree] = List(TypeTree.of[Object], TypeTree.of[JsonObjectWriter[T]]) - val clsBody: List[Statement] = (if (isSameTypeWriterExists) Nil else List(thisWriterDef)) ::: - innerWriterDefs ::: List(writeMethodDef, writeValuesMethodDef) + val derivedWriterClsParents: List[TypeTree] = + List(TypeTree.of[Object], TypeTree.of[JsonObjectWriter[T]]) + val clsBody: List[Statement] = + (if (isSameTypeWriterExists) Nil else List(thisWriterDef)) ::: + innerWriterDefs ::: List(writeMethodDef, writeValuesMethodDef) createDerivedWriterExpr[T](clsSym, derivedWriterClsParents, clsBody) } - private def createWriterTpeTermPairs(tpes: List[TypeRepr]): List[(TypeRepr, Term)] = + private def createWriterTpeTermPairs( + tpes: List[TypeRepr] + ): List[(TypeRepr, Term)] = tpes.foldLeft(List.empty) { case (rest, fieldTpe) if !rest.exists(_._1 <:< fieldTpe.widen) => val writerTpe: TypeRepr = fieldTpe.wrappedTo[JsonWriter] - val writerTerm: Term = fieldTpe.createWriterTerm(_.searchInlineJsonObjectWriter) + val writerTerm: Term = + fieldTpe.createWriterTerm(_.searchInlineJsonObjectWriter) rest :+ (writerTpe, writerTerm) case (rest, _) => rest } private def createSealedWriteMethodDef[T: Type]( - sym: Symbol, - childTpes: List[TypeRepr], - writeValuesMethodDefSym: Symbol + sym: Symbol, + childTpes: List[TypeRepr], + writeValuesMethodDefSym: Symbol ): DefDef = DefDef( symbol = sym, @@ -373,19 +451,34 @@ trait WriterDerivation extends WriterBuilderCommons { val typeChildTpt: TypeTree = typeChildTpr.asType match { case '[t] => TypeTree.of[t] } - val typeChildBind = Symbol.newBind(Symbol.spliceOwner, "c", Flags.EmptyFlags, typeChildTpr) + val typeChildBind = Symbol.newBind( + Symbol.spliceOwner, + "c", + Flags.EmptyFlags, + typeChildTpr + ) val terms: List[Term] = { - val writeObjectStartTerm = tokenWriterTerm.selectFirstMethod("writeObjectStart").appliedToNone - val writeValuesTerm = Ref(writeValuesMethodDefSym).appliedTo(valueTerm, tokenWriterTerm) - val writeObjectEndTerm = tokenWriterTerm.selectFirstMethod("writeObjectEnd").appliedToNone + val writeObjectStartTerm = tokenWriterTerm + .selectFirstMethod("writeObjectStart") + .appliedToNone + val writeValuesTerm = Ref(writeValuesMethodDefSym) + .appliedTo(valueTerm, tokenWriterTerm) + val writeObjectEndTerm = tokenWriterTerm + .selectFirstMethod("writeObjectEnd") + .appliedToNone List(writeObjectStartTerm, writeValuesTerm, writeObjectEndTerm) } val rhs = Block(terms, '{ () }.asTerm) - CaseDef(Bind(typeChildBind, Typed(Ref(typeChildBind), typeChildTpt)), None, rhs) + CaseDef( + Bind(typeChildBind, Typed(Ref(typeChildBind), typeChildTpt)), + None, + rhs + ) case termChildTpr => val termChildSym: Symbol = termChildTpr.termSymbol val termChildRef: Ref = Ref(termChildSym) - val rhs: Term = Ref(writeValuesMethodDefSym).appliedTo(valueTerm, tokenWriterTerm) + val rhs: Term = Ref(writeValuesMethodDefSym) + .appliedTo(valueTerm, tokenWriterTerm) CaseDef(termChildRef, None, rhs) } @@ -397,10 +490,10 @@ trait WriterDerivation extends WriterBuilderCommons { ) private def createSealedWriteValuesMethodDef[T: Type]( - sym: Symbol, - childTpes: List[TypeRepr], - writerDefs: List[ValDef], - discriminator: Option[String] + sym: Symbol, + childTpes: List[TypeRepr], + writerDefs: List[ValDef], + discriminator: Option[String] ): DefDef = DefDef( symbol = sym, @@ -413,40 +506,81 @@ trait WriterDerivation extends WriterBuilderCommons { val typeChildTpt: TypeTree = typeChildTpr.asType match { case '[t] => TypeTree.of[t] } - val termChildWriter: Ref = getWriterDefRef(writerDefs, typeChildTpr) - val typeChildWriteValuesMethod = termChildWriter.selectWriteValuesMethod - val typeChildBind = Symbol.newBind(Symbol.spliceOwner, "c", Flags.EmptyFlags, typeChildTpr) - val writeValuesTerm = typeChildWriteValuesMethod.appliedTo(Ref(typeChildBind), tokenWriterTerm) - val discriminatorTerm = discriminator.fold(Literal(UnitConstant())) { discriminator => - TypeRepr - .of[String] - .getWrite3Method - .appliedTo(Expr(discriminator).asTerm, Expr(typeChildTpr.typeSymbol.name).asTerm, tokenWriterTerm) - } + val termChildWriter: Ref = + getWriterDefRef(writerDefs, typeChildTpr) + val typeChildWriteValuesMethod = + termChildWriter.selectWriteValuesMethod + val typeChildBind = Symbol.newBind( + Symbol.spliceOwner, + "c", + Flags.EmptyFlags, + typeChildTpr + ) + val writeValuesTerm = typeChildWriteValuesMethod.appliedTo( + Ref(typeChildBind), + tokenWriterTerm + ) + val discriminatorTerm = + discriminator.fold(Literal(UnitConstant())) { discriminator => + TypeRepr + .of[String] + .getWrite3Method + .appliedTo( + Expr(discriminator).asTerm, + Expr(typeChildTpr.typeSymbol.name).asTerm, + tokenWriterTerm + ) + } val rhs = Block(List(writeValuesTerm), discriminatorTerm) - CaseDef(Bind(typeChildBind, Typed(Ref(typeChildBind), typeChildTpt)), None, rhs) + CaseDef( + Bind(typeChildBind, Typed(Ref(typeChildBind), typeChildTpt)), + None, + rhs + ) case termChildTpr => val termChildSym = termChildTpr.termSymbol val termChildRef = Ref(termChildSym) val termChildNameTerm = Expr(termChildSym.name).asTerm val termChildWriter = getWriterDefRef(writerDefs, termChildTpr) - val discriminatorTerm = discriminator.fold(Literal(UnitConstant())) { discriminator => - TypeRepr - .of[String] - .getWrite3Method - .appliedTo(Expr(discriminator).asTerm, termChildNameTerm, tokenWriterTerm) - } - val writeObjectStartTerm = tokenWriterTerm.selectFirstMethod("writeObjectStart").appliedToNone - val writeObjectEndTerm = tokenWriterTerm.selectFirstMethod("writeObjectEnd").appliedToNone + val discriminatorTerm = + discriminator.fold(Literal(UnitConstant())) { discriminator => + TypeRepr + .of[String] + .getWrite3Method + .appliedTo( + Expr(discriminator).asTerm, + termChildNameTerm, + tokenWriterTerm + ) + } + val writeObjectStartTerm = tokenWriterTerm + .selectFirstMethod("writeObjectStart") + .appliedToNone + val writeObjectEndTerm = tokenWriterTerm + .selectFirstMethod("writeObjectEnd") + .appliedToNone val terms: List[Term] = if (termChildSym.flags.is(Flags.Enum)) { if (discriminator.isEmpty) - List(termChildWriter.selectWriteValuesMethod.appliedTo(termChildRef, tokenWriterTerm)) + List( + termChildWriter.selectWriteValuesMethod + .appliedTo(termChildRef, tokenWriterTerm) + ) else - List(writeObjectStartTerm, discriminatorTerm, writeObjectEndTerm) + List( + writeObjectStartTerm, + discriminatorTerm, + writeObjectEndTerm + ) } else { - val writeValuesTerm = termChildWriter.selectWriteValuesMethod.appliedTo(termChildRef, tokenWriterTerm) - List(writeObjectStartTerm, writeValuesTerm, discriminatorTerm, writeObjectEndTerm) + val writeValuesTerm = termChildWriter.selectWriteValuesMethod + .appliedTo(termChildRef, tokenWriterTerm) + List( + writeObjectStartTerm, + writeValuesTerm, + discriminatorTerm, + writeObjectEndTerm + ) } val rhs = Block(terms, '{ () }.asTerm) CaseDef(termChildRef, None, rhs) @@ -470,14 +604,21 @@ trait WriterDerivation extends WriterBuilderCommons { override def writeValues(value: T, tokenWriter: TokenWriter): Unit = ${ val tokenWriterTerm = 'tokenWriter.asTerm - TypeRepr.of[String].getWrite2Method.appliedTo(termNameTerm, tokenWriterTerm).asExprOf[Unit] + TypeRepr + .of[String] + .getWrite2Method + .appliedTo(termNameTerm, tokenWriterTerm) + .asExprOf[Unit] } } } } // ------------------------------------ COMMON ------------------------------------ - private def createClsSym(tpe: TypeRepr, declsFn: Symbol => List[Symbol]): Symbol = + private def createClsSym( + tpe: TypeRepr, + declsFn: Symbol => List[Symbol] + ): Symbol = Symbol.newClass( parent = Symbol.spliceOwner, name = tpe.typeSymbol.name + "_DerivedWriter", @@ -495,7 +636,11 @@ trait WriterDerivation extends WriterBuilderCommons { privateWithin = Symbol.noSymbol ) - private def createInnerWriterSym(parentSymbol: Symbol, tpe: TypeRepr, idx: Int): Symbol = + private def createInnerWriterSym( + parentSymbol: Symbol, + tpe: TypeRepr, + idx: Int + ): Symbol = Symbol.newVal( parent = parentSymbol, name = s"innerWriter_$idx", @@ -504,7 +649,11 @@ trait WriterDerivation extends WriterBuilderCommons { privateWithin = Symbol.noSymbol ) - private def createWriteValuesMethodSym(parentSymbol: Symbol, name: String, tpe: TypeRepr): Symbol = + private def createWriteValuesMethodSym( + parentSymbol: Symbol, + name: String, + tpe: TypeRepr + ): Symbol = Symbol.newMethod( parent = parentSymbol, name = name, @@ -516,7 +665,9 @@ trait WriterDerivation extends WriterBuilderCommons { privateWithin = Symbol.noSymbol ) - private def getValueAndTokenWriterTerms[T: Type](params: List[List[Tree]]): (Term, Term) = { + private def getValueAndTokenWriterTerms[T: Type]( + params: List[List[Tree]] + ): (Term, Term) = { val value: Expr[T] = params.head.head.asExprOf[T] val tokenWriter: Expr[TokenWriter] = params.head(1).asExprOf[TokenWriter] @@ -525,13 +676,22 @@ trait WriterDerivation extends WriterBuilderCommons { private sealed trait Extractor private case class InlineExtract(term: Term) extends Extractor - private case class FunctionExtractor(arg: InlineExtract, from: TypeRepr, to: TypeRepr, body: Term) extends Extractor + private case class FunctionExtractor( + arg: InlineExtract, + from: TypeRepr, + to: TypeRepr, + body: Term + ) extends Extractor private sealed trait WriterField { def name: String } - private case class SimpleWriterField(name: String, jsonName: Expr[String], tpe: TypeRepr, extractor: Extractor) - extends WriterField + private case class SimpleWriterField( + name: String, + jsonName: Expr[String], + tpe: TypeRepr, + extractor: Extractor + ) extends WriterField private case class PartialExtractedField( name: String, jsonName: Expr[String], diff --git a/modules/macro-derivation/src/main/scala-3/tethys/derivation/package.scala b/modules/macro-derivation/src/main/scala-3/tethys/derivation/package.scala index 0a73f1dc..d0225c1d 100644 --- a/modules/macro-derivation/src/main/scala-3/tethys/derivation/package.scala +++ b/modules/macro-derivation/src/main/scala-3/tethys/derivation/package.scala @@ -15,6 +15,7 @@ package object derivation { } extension (underlying: JsonObjectWriter.type) { - inline def derived[T](using Mirror.Of[T]): JsonObjectWriter[T] = jsonWriter[T] + inline def derived[T](using Mirror.Of[T]): JsonObjectWriter[T] = + jsonWriter[T] } } diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/ADTWithType.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/ADTWithType.scala index 67d306b8..01667b2c 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/ADTWithType.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/ADTWithType.scala @@ -5,4 +5,4 @@ sealed trait ADTWithType[A] object ADTWithType { case class ADTWithTypeA[A](a: A) extends ADTWithType[A] case class ADTWithTypeB[A](a: A, b: ADTWithType[A]) extends ADTWithType[A] -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/ADTWithWrongType.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/ADTWithWrongType.scala index ea278168..66aa5d9e 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/ADTWithWrongType.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/ADTWithWrongType.scala @@ -6,6 +6,7 @@ object ADTWithWrongType { case class ADTWithWrongTypeA[A](a: A) extends ADTWithWrongType[A] - case class ADTWithWrongTypeB[A, B](a: A, b: ADTWithWrongType[B]) extends ADTWithWrongType[A] + case class ADTWithWrongTypeB[A, B](a: A, b: ADTWithWrongType[B]) + extends ADTWithWrongType[A] -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/AutoReaderDerivationTest.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/AutoReaderDerivationTest.scala index 8b89ecab..e9cd824c 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/AutoReaderDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/AutoReaderDerivationTest.scala @@ -17,18 +17,19 @@ class AutoReaderDerivationTest extends AnyFlatSpec with Matchers { res } - behavior of "auto derivation" it should "derive readers for simple case class hierarchy" in { - read[JsonTreeTestData](obj( - "a" -> 1, - "b" -> true, - "c" -> obj( - "d" -> obj( - "a" -> 2 + read[JsonTreeTestData]( + obj( + "a" -> 1, + "b" -> true, + "c" -> obj( + "d" -> obj( + "a" -> 2 + ) ) ) - )) shouldBe JsonTreeTestData( + ) shouldBe JsonTreeTestData( a = 1, b = true, c = C(D(2)) @@ -36,31 +37,38 @@ class AutoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for recursive type" in { - read[RecursiveType](obj( - "a" -> 1, - "children" -> arr( - obj( - "a" -> 2, - "children" -> arr() - ), - obj( - "a" -> 3, - "children" -> arr() + read[RecursiveType]( + obj( + "a" -> 1, + "children" -> arr( + obj( + "a" -> 2, + "children" -> arr() + ), + obj( + "a" -> 3, + "children" -> arr() + ) ) ) - )) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) + ) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) } it should "derive reader for A => B => A cycle" in { - read[ComplexRecursionA](obj( - "a" -> 1, - "b" -> obj( - "b" -> 2, - "a" -> obj( - "a" -> 3 + read[ComplexRecursionA]( + obj( + "a" -> 1, + "b" -> obj( + "b" -> 2, + "a" -> obj( + "a" -> 3 + ) ) ) - )) shouldBe ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))) + ) shouldBe ComplexRecursionA( + 1, + Some(ComplexRecursionB(2, ComplexRecursionA(3, None))) + ) } } diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/AutoWriterDerivationTest.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/AutoWriterDerivationTest.scala index e66ac168..db32a791 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/AutoWriterDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/AutoWriterDerivationTest.scala @@ -27,15 +27,23 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writers for a lot of embedded classes" in { - Seq(SeqMaster1(Seq(SeqMaster2(Seq(SeqMaster3(Seq(SeqMaster4(Seq(1))))))))).asTokenList shouldBe arr( + Seq( + SeqMaster1(Seq(SeqMaster2(Seq(SeqMaster3(Seq(SeqMaster4(Seq(1)))))))) + ).asTokenList shouldBe arr( obj( - "a" -> arr(obj( - "a" -> arr(obj( - "a" -> arr(obj( - "a" -> arr(1) - )) - )) - )) + "a" -> arr( + obj( + "a" -> arr( + obj( + "a" -> arr( + obj( + "a" -> arr(1) + ) + ) + ) + ) + ) + ) ) ) } @@ -53,7 +61,10 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writer for A => B => A cycle" in { - ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))).asTokenList shouldBe obj( + ComplexRecursionA( + 1, + Some(ComplexRecursionB(2, ComplexRecursionA(3, None))) + ).asTokenList shouldBe obj( "a" -> 1, "b" -> obj( "b" -> 2, @@ -65,7 +76,9 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writer for sealed cyclic trait with type parameter" in { - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[ + Int + ]).asTokenList shouldBe obj( "a" -> 1, "b" -> obj( "a" -> 2 @@ -74,15 +87,19 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writer that normally concatenates with other JsonObjectWriter's" in { - implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonObjectWriter[ADTWithType[B]] = { - val simpleJsonObjectWriter = SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { - case _: ADTWithTypeA[B] => "ADTWithTypeA" - case _: ADTWithTypeB[B] => "ADTWithTypeB" - } + implicit def recursionTraitWithTypeWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithType[B]] = { + val simpleJsonObjectWriter = + SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { + case _: ADTWithTypeA[B] => "ADTWithTypeA" + case _: ADTWithTypeB[B] => "ADTWithTypeB" + } simpleJsonObjectWriter ++ jsonWriter[ADTWithType[B]] } - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[ + Int + ]).asTokenList shouldBe obj( "clazz" -> "ADTWithTypeB", "a" -> 1, "b" -> obj( @@ -97,12 +114,16 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writer for simple sealed trait with hierarchy" in { - implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = JsonWriter.obj[SimpleClass].addField("b")(_.b) - implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj.addField("type")(_ => "JustObject") + implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = + JsonWriter.obj[SimpleClass].addField("b")(_.b) + implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = + JsonWriter.obj.addField("type")(_ => "JustObject") - implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType] + implicit val sealedWriter: JsonWriter[SimpleSealedType] = + jsonWriter[SimpleSealedType] - def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList + def write(simpleSealedType: SimpleSealedType): List[TokenNode] = + simpleSealedType.asTokenList write(CaseClass(1)) shouldBe obj("a" -> 1) write(new SimpleClass(2)) shouldBe obj("b" -> 2) diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/RedundantJsonReaderTest.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/RedundantJsonReaderTest.scala index 7aa471d6..bc5b0fa6 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/RedundantJsonReaderTest.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/RedundantJsonReaderTest.scala @@ -29,13 +29,16 @@ class RedundantJsonReaderTest extends AnyFlatSpec with Matchers { implicit val reader: JsonReader[BaseClass] = jsonReader[BaseClass] { describe { ReaderBuilder[BaseClass] - .extract(_.r).from("intField".as[Int])(RedundantClass.apply) + .extract(_.r) + .from("intField".as[Int])(RedundantClass.apply) } } - read[BaseClass](obj( - "intField" -> 1 - )) shouldBe BaseClass(RedundantClass(1)) + read[BaseClass]( + obj( + "intField" -> 1 + ) + ) shouldBe BaseClass(RedundantClass(1)) } } diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/SemiautoReaderDerivationTest.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/SemiautoReaderDerivationTest.scala index 1492a5db..35c1b13e 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/SemiautoReaderDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/SemiautoReaderDerivationTest.scala @@ -5,7 +5,11 @@ import org.scalatest.flatspec.AnyFlatSpec import tethys.JsonReader import tethys.commons.TokenNode._ import tethys.commons.{Token, TokenNode} -import tethys.derivation.builder.{FieldStyle, ReaderBuilder, ReaderDerivationConfig} +import tethys.derivation.builder.{ + FieldStyle, + ReaderBuilder, + ReaderDerivationConfig +} import tethys.derivation.semiauto._ import tethys.readers.ReaderError import tethys.readers.tokens.QueueIterator @@ -19,22 +23,24 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { res } - behavior of "semiauto derivation" it should "derive readers for simple case class hierarchy" in { implicit val dReader: JsonReader[D] = jsonReader[D] implicit val cReader: JsonReader[C] = jsonReader[C] - implicit val jsonTreeTestDataReader: JsonReader[JsonTreeTestData] = jsonReader[JsonTreeTestData] - - read[JsonTreeTestData](obj( - "a" -> 1, - "b" -> true, - "c" -> obj( - "d" -> obj( - "a" -> 2 + implicit val jsonTreeTestDataReader: JsonReader[JsonTreeTestData] = + jsonReader[JsonTreeTestData] + + read[JsonTreeTestData]( + obj( + "a" -> 1, + "b" -> true, + "c" -> obj( + "d" -> obj( + "a" -> 2 + ) ) ) - )) shouldBe JsonTreeTestData( + ) shouldBe JsonTreeTestData( a = 1, b = true, c = C(D(2)) @@ -42,167 +48,212 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for recursive type" in { - implicit lazy val recursiveReader: JsonReader[RecursiveType] = jsonReader[RecursiveType] - - read[RecursiveType](obj( - "a" -> 1, - "children" -> arr( - obj( - "a" -> 2, - "children" -> arr() - ), - obj( - "a" -> 3, - "children" -> arr() + implicit lazy val recursiveReader: JsonReader[RecursiveType] = + jsonReader[RecursiveType] + + read[RecursiveType]( + obj( + "a" -> 1, + "children" -> arr( + obj( + "a" -> 2, + "children" -> arr() + ), + obj( + "a" -> 3, + "children" -> arr() + ) ) ) - )) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) + ) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) } it should "derive reader for A => B => A cycle" in { - implicit lazy val testReader1: JsonReader[ComplexRecursionA] = jsonReader[ComplexRecursionA] - implicit lazy val testReader2: JsonReader[ComplexRecursionB] = jsonReader[ComplexRecursionB] - - read[ComplexRecursionA](obj( - "a" -> 1, - "b" -> obj( - "b" -> 2, - "a" -> obj( - "a" -> 3 + implicit lazy val testReader1: JsonReader[ComplexRecursionA] = + jsonReader[ComplexRecursionA] + implicit lazy val testReader2: JsonReader[ComplexRecursionB] = + jsonReader[ComplexRecursionB] + + read[ComplexRecursionA]( + obj( + "a" -> 1, + "b" -> obj( + "b" -> 2, + "a" -> obj( + "a" -> 3 + ) ) ) - )) shouldBe ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))) + ) shouldBe ComplexRecursionA( + 1, + Some(ComplexRecursionB(2, ComplexRecursionA(3, None))) + ) } it should "derive reader for extract as description" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).as[Option[Int]](_.getOrElse(2)) + .extract(_.i) + .as[Option[Int]](_.getOrElse(2)) } } - read[SimpleType](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(1, "str", 1.0) + read[SimpleType]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(1, "str", 1.0) - read[SimpleType](obj( - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(2, "str", 1.0) + read[SimpleType]( + obj( + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(2, "str", 1.0) } it should "derive reader for extract from description" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from(_.s, _.d)((s, d) => 2) + .extract(_.i) + .from(_.s, _.d)((s, d) => 2) } } - read[SimpleType](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(2, "str", 1.0) + read[SimpleType]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(2, "str", 1.0) - read[SimpleType](obj( - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(2, "str", 1.0) + read[SimpleType]( + obj( + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(2, "str", 1.0) } it should "derive reader for extract from description with synthetic field" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from(_.d).and(Symbol("e").as[Double])((d, e) => (d + e).toInt) + .extract(_.i) + .from(_.d) + .and(Symbol("e").as[Double])((d, e) => (d + e).toInt) } } - read[SimpleType](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0, - "e" -> 2.0 - )) shouldBe SimpleType(3, "str", 1.0) + read[SimpleType]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0, + "e" -> 2.0 + ) + ) shouldBe SimpleType(3, "str", 1.0) - read[SimpleType](obj( - "s" -> "str", - "d" -> 1.0, - "e" -> 3.0 - )) shouldBe SimpleType(4, "str", 1.0) + read[SimpleType]( + obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 3.0 + ) + ) shouldBe SimpleType(4, "str", 1.0) } it should "derive reader for extract reader from description" in { - implicit val reader: JsonReader[SimpleTypeWithAny] = jsonReader[SimpleTypeWithAny] { - describe { - ReaderBuilder[SimpleTypeWithAny] - .extractReader(_.any).from(_.d) { - case 1.0 => JsonReader[String] - case 2.0 => JsonReader[Int] + implicit val reader: JsonReader[SimpleTypeWithAny] = + jsonReader[SimpleTypeWithAny] { + describe { + ReaderBuilder[SimpleTypeWithAny] + .extractReader(_.any) + .from(_.d) { + case 1.0 => JsonReader[String] + case 2.0 => JsonReader[Int] + } } } - } - - read[SimpleTypeWithAny](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0, - "any" -> "anyStr" - )) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") - read[SimpleTypeWithAny](obj( - "i" -> 1, - "s" -> "str", - "d" -> 2.0, - "any" -> 2 - )) shouldBe SimpleTypeWithAny(1, "str", 2.0, 2) + read[SimpleTypeWithAny]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0, + "any" -> "anyStr" + ) + ) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") + + read[SimpleTypeWithAny]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 2.0, + "any" -> 2 + ) + ) shouldBe SimpleTypeWithAny(1, "str", 2.0, 2) } it should "derive reader for complex extraction case" in { - implicit val reader: JsonReader[SimpleTypeWithAny] = jsonReader[SimpleTypeWithAny] { - ReaderBuilder[SimpleTypeWithAny] - .extractReader(_.any).from(_.i) { - case 1 => JsonReader[String] - case 2 => JsonReader[Int] - case _ => JsonReader[Option[Boolean]] + implicit val reader: JsonReader[SimpleTypeWithAny] = + jsonReader[SimpleTypeWithAny] { + ReaderBuilder[SimpleTypeWithAny] + .extractReader(_.any) + .from(_.i) { + case 1 => JsonReader[String] + case 2 => JsonReader[Int] + case _ => JsonReader[Option[Boolean]] + } + .extract(_.i) + .from(_.d) + .and(Symbol("e").as[Int])((d, e) => d.toInt + e) + .extract(_.d) + .as[Option[Double]](_.getOrElse(1.0)) } - .extract(_.i).from(_.d).and(Symbol("e").as[Int])((d, e) => d.toInt + e) - .extract(_.d).as[Option[Double]](_.getOrElse(1.0)) - } - - read[SimpleTypeWithAny](obj( - "s" -> "str", - "d" -> 1.0, - "e" -> 0, - "any" -> "anyStr" - )) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") - read[SimpleTypeWithAny](obj( - "s" -> "str", - "e" -> 0, - "any" -> "anyStr" - )) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") - - read[SimpleTypeWithAny](obj( - "s" -> "str", - "d" -> 1.0, - "e" -> 1, - "any" -> 3 - )) shouldBe SimpleTypeWithAny(2, "str", 1.0, 3) + read[SimpleTypeWithAny]( + obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 0, + "any" -> "anyStr" + ) + ) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") - read[SimpleTypeWithAny](obj( - "s" -> "str", - "d" -> 1.0, - "e" -> 2, - "any" -> true - )) shouldBe SimpleTypeWithAny(3, "str", 1.0, Some(true)) + read[SimpleTypeWithAny]( + obj( + "s" -> "str", + "e" -> 0, + "any" -> "anyStr" + ) + ) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") + + read[SimpleTypeWithAny]( + obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 1, + "any" -> 3 + ) + ) shouldBe SimpleTypeWithAny(2, "str", 1.0, 3) + + read[SimpleTypeWithAny]( + obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 2, + "any" -> true + ) + ) shouldBe SimpleTypeWithAny(3, "str", 1.0, Some(true)) - //FIXME: figure out how to handle this case + // FIXME: figure out how to handle this case /*read[SimpleTypeWithAny](obj( "s" -> "str", "d" -> 1.0, @@ -211,16 +262,19 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for fieldStyle from description" in { - implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames] { - ReaderBuilder[CamelCaseNames] - .fieldStyle(FieldStyle.lowerSnakecase) - } + implicit val reader: JsonReader[CamelCaseNames] = + jsonReader[CamelCaseNames] { + ReaderBuilder[CamelCaseNames] + .fieldStyle(FieldStyle.lowerSnakecase) + } - read[CamelCaseNames](obj( - "some_param" -> 1, - "id_param" -> 2, - "simple" -> 3 - )) shouldBe CamelCaseNames( + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + ) + ) shouldBe CamelCaseNames( someParam = 1, IDParam = 2, simple = 3 @@ -228,16 +282,19 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for fieldStyle from function in description" in { - implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames] { - ReaderBuilder[CamelCaseNames] - .fieldStyle(FieldStyle(_.capitalize)) - } + implicit val reader: JsonReader[CamelCaseNames] = + jsonReader[CamelCaseNames] { + ReaderBuilder[CamelCaseNames] + .fieldStyle(FieldStyle(_.capitalize)) + } - read[CamelCaseNames](obj( - "SomeParam" -> 1, - "IDParam" -> 2, - "Simple" -> 3 - )) shouldBe CamelCaseNames( + read[CamelCaseNames]( + obj( + "SomeParam" -> 1, + "IDParam" -> 2, + "Simple" -> 3 + ) + ) shouldBe CamelCaseNames( someParam = 1, IDParam = 2, simple = 3 @@ -248,79 +305,96 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from("i".as[Int])(identity) + .extract(_.i) + .from("i".as[Int])(identity) } } - read[SimpleType](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(1, "str", 1.0) + read[SimpleType]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(1, "str", 1.0) } it should "derive reader for extract field even it described few times" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from("i".as[Int])(identity) - .extract(_.s).from("i".as[Long])(_.toString) - .extract(_.d).from(_.i)(_.toDouble) + .extract(_.i) + .from("i".as[Int])(identity) + .extract(_.s) + .from("i".as[Long])(_.toString) + .extract(_.d) + .from(_.i)(_.toDouble) } } - read[SimpleType](obj( - "i" -> 1 - )) shouldBe SimpleType(1, "1", 1.0) + read[SimpleType]( + obj( + "i" -> 1 + ) + ) shouldBe SimpleType(1, "1", 1.0) } it should "derive reader for reader config" in { - implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames]( - ReaderDerivationConfig.withFieldStyle(FieldStyle.lowerSnakecase).strict - ) + implicit val reader: JsonReader[CamelCaseNames] = + jsonReader[CamelCaseNames]( + ReaderDerivationConfig.withFieldStyle(FieldStyle.lowerSnakecase).strict + ) - read[CamelCaseNames](obj( - "some_param" -> 1, - "id_param" -> 2, - "simple" -> 3 - )) shouldBe CamelCaseNames( + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + ) + ) shouldBe CamelCaseNames( someParam = 1, IDParam = 2, simple = 3 ) the[ReaderError] thrownBy { - read[CamelCaseNames](obj( - "some_param" -> 1, - "not_id_param" -> 2, - "simple" -> 3 - )) + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "not_id_param" -> 2, + "simple" -> 3 + ) + ) } should have message "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'some_param', 'id_param', 'simple'" } it should "derive reader for reader config from builder" in { - implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames]( - ReaderBuilder[CamelCaseNames] - .strict - .fieldStyle(FieldStyle.lowerSnakecase) - ) + implicit val reader: JsonReader[CamelCaseNames] = + jsonReader[CamelCaseNames]( + ReaderBuilder[CamelCaseNames].strict + .fieldStyle(FieldStyle.lowerSnakecase) + ) - read[CamelCaseNames](obj( - "some_param" -> 1, - "id_param" -> 2, - "simple" -> 3 - )) shouldBe CamelCaseNames( + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + ) + ) shouldBe CamelCaseNames( someParam = 1, IDParam = 2, simple = 3 ) the[ReaderError] thrownBy { - read[CamelCaseNames](obj( - "some_param" -> 1, - "not_id_param" -> 2, - "simple" -> 3 - )) + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "not_id_param" -> 2, + "simple" -> 3 + ) + ) } should have message "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'some_param', 'id_param', 'simple'" } } diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/SemiautoWriterDerivationTest.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/SemiautoWriterDerivationTest.scala index fa36e292..a23d130b 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/SemiautoWriterDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/SemiautoWriterDerivationTest.scala @@ -4,7 +4,11 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec import tethys.commons.TokenNode import tethys.{JsonObjectWriter, JsonWriter} -import tethys.derivation.builder.{FieldStyle, WriterBuilder, WriterDerivationConfig} +import tethys.derivation.builder.{ + FieldStyle, + WriterBuilder, + WriterDerivationConfig +} import tethys.writers.tokens.SimpleTokenWriter._ import tethys.commons.TokenNode._ import tethys.derivation.ADTWithType.{ADTWithTypeA, ADTWithTypeB} @@ -17,12 +21,14 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { it should "generate proper writer from WriterDescription" in { def freeVariable: String = "e" - implicit val dWriter: JsonWriter[D] = jsonWriter[D](WriterDerivationConfig.withFieldStyle(FieldStyle.uppercase)) + implicit val dWriter: JsonWriter[D] = + jsonWriter[D](WriterDerivationConfig.withFieldStyle(FieldStyle.uppercase)) implicit val testWriter: JsonWriter[JsonTreeTestData] = jsonWriter { WriterBuilder[JsonTreeTestData] .remove(_.b) - .update(_.a).fromRoot(d => d.a.toDouble + d.c.d.a) + .update(_.a) + .fromRoot(d => d.a.toDouble + d.c.d.a) .update(_.c)(_.d) .add("d")(_.a * 2) .add(freeVariable)(_.b) @@ -42,8 +48,8 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { describe { WriterBuilder[D] .updatePartial(_.a) { - case 1 => "uno!" - case 2 => 1 + case 1 => "uno!" + case 2 => 1 case v if v > 0 => v * 2 case _ => throw new IllegalArgumentException("Wrong value!") } @@ -63,12 +69,13 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { implicit val partialWriter: JsonWriter[D] = jsonWriter { describe { WriterBuilder[D] - .updatePartial(_.a).fromRoot { - case d if d.a == 1 => "uno!" - case d if d.a == 2 => 1 - case d if d.a > 0 => d.a * 2 - case _ => throw new IllegalArgumentException("Wrong value!") - } + .updatePartial(_.a) + .fromRoot { + case d if d.a == 1 => "uno!" + case d if d.a == 2 => 1 + case d if d.a > 0 => d.a * 2 + case _ => throw new IllegalArgumentException("Wrong value!") + } } } @@ -86,7 +93,8 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for recursive type" in { - implicit lazy val testWriter: JsonWriter[RecursiveType] = jsonWriter[RecursiveType] + implicit lazy val testWriter: JsonWriter[RecursiveType] = + jsonWriter[RecursiveType] RecursiveType(1, Seq(RecursiveType(2))).asTokenList shouldBe obj( "a" -> 1, @@ -100,10 +108,15 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for A => B => A cycle" in { - implicit lazy val testWriter1: JsonWriter[ComplexRecursionA] = jsonWriter[ComplexRecursionA] - implicit lazy val testWriter2: JsonWriter[ComplexRecursionB] = jsonWriter[ComplexRecursionB] - - ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))).asTokenList shouldBe obj( + implicit lazy val testWriter1: JsonWriter[ComplexRecursionA] = + jsonWriter[ComplexRecursionA] + implicit lazy val testWriter2: JsonWriter[ComplexRecursionB] = + jsonWriter[ComplexRecursionB] + + ComplexRecursionA( + 1, + Some(ComplexRecursionB(2, ComplexRecursionA(3, None))) + ).asTokenList shouldBe obj( "a" -> 1, "b" -> obj( "b" -> 2, @@ -115,13 +128,18 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for sealed cyclic trait with type parameter" in { - implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonObjectWriter[ADTWithType[B]] = jsonWriter[ADTWithType[B]] + implicit def recursionTraitWithTypeWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithType[B]] = jsonWriter[ADTWithType[B]] - implicit def recursionTraitWithTypeAWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeA[B]] = jsonWriter[ADTWithTypeA[B]] + implicit def recursionTraitWithTypeAWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithTypeA[B]] = jsonWriter[ADTWithTypeA[B]] - implicit def recursionTraitWithTypeBWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeB[B]] = jsonWriter[ADTWithTypeB[B]] + implicit def recursionTraitWithTypeBWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithTypeB[B]] = jsonWriter[ADTWithTypeB[B]] - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[ + Int + ]).asTokenList shouldBe obj( "a" -> 1, "b" -> obj( "a" -> 2 @@ -130,19 +148,25 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer that normally concatenates with other JsonWriter's" in { - implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonWriter[ADTWithType[B]] = { - val simpleJsonWriter = SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { - case _: ADTWithTypeA[B] => "ADTWithTypeA" - case _: ADTWithTypeB[B] => "ADTWithTypeB" - } + implicit def recursionTraitWithTypeWriter[B: JsonWriter] + : JsonWriter[ADTWithType[B]] = { + val simpleJsonWriter = + SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { + case _: ADTWithTypeA[B] => "ADTWithTypeA" + case _: ADTWithTypeB[B] => "ADTWithTypeB" + } simpleJsonWriter ++ jsonWriter[ADTWithType[B]] } - implicit def recursionTraitWithTypeAWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeA[B]] = jsonWriter[ADTWithTypeA[B]] + implicit def recursionTraitWithTypeAWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithTypeA[B]] = jsonWriter[ADTWithTypeA[B]] - implicit def recursionTraitWithTypeBWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeB[B]] = jsonWriter[ADTWithTypeB[B]] + implicit def recursionTraitWithTypeBWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithTypeB[B]] = jsonWriter[ADTWithTypeB[B]] - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[ + Int + ]).asTokenList shouldBe obj( "clazz" -> "ADTWithTypeB", "a" -> 1, "b" -> obj( @@ -161,14 +185,20 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for simple sealed trait with hierarchy" in { - implicit val caseClassWriter: JsonObjectWriter[CaseClass] = jsonWriter[CaseClass] - implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = JsonWriter.obj[SimpleClass].addField("b")(_.b) - implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj.addField("type")(_ => "JustObject") - implicit val subChildWriter: JsonObjectWriter[SubChild] = jsonWriter[SubChild] + implicit val caseClassWriter: JsonObjectWriter[CaseClass] = + jsonWriter[CaseClass] + implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = + JsonWriter.obj[SimpleClass].addField("b")(_.b) + implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = + JsonWriter.obj.addField("type")(_ => "JustObject") + implicit val subChildWriter: JsonObjectWriter[SubChild] = + jsonWriter[SubChild] - implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType] + implicit val sealedWriter: JsonWriter[SimpleSealedType] = + jsonWriter[SimpleSealedType] - def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList + def write(simpleSealedType: SimpleSealedType): List[TokenNode] = + simpleSealedType.asTokenList write(CaseClass(1)) shouldBe obj("a" -> 1) write(new SimpleClass(2)) shouldBe obj("b" -> 2) @@ -177,16 +207,22 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for simple sealed trait with hierarchy with discriminator" in { - implicit val caseClassWriter: JsonObjectWriter[CaseClass] = jsonWriter[CaseClass] - implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = JsonWriter.obj[SimpleClass].addField("b")(_.b) - implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj - implicit val subChildWriter: JsonObjectWriter[SubChild] = jsonWriter[SubChild] - - implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType]( - WriterDerivationConfig.empty.withDiscriminator("__type") - ) + implicit val caseClassWriter: JsonObjectWriter[CaseClass] = + jsonWriter[CaseClass] + implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = + JsonWriter.obj[SimpleClass].addField("b")(_.b) + implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = + JsonWriter.obj + implicit val subChildWriter: JsonObjectWriter[SubChild] = + jsonWriter[SubChild] + + implicit val sealedWriter: JsonWriter[SimpleSealedType] = + jsonWriter[SimpleSealedType]( + WriterDerivationConfig.empty.withDiscriminator("__type") + ) - def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList + def write(simpleSealedType: SimpleSealedType): List[TokenNode] = + simpleSealedType.asTokenList write(CaseClass(1)) shouldBe obj("a" -> 1, "__type" -> "CaseClass") write(new SimpleClass(2)) shouldBe obj("b" -> 2, "__type" -> "SimpleClass") diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/WriterRenamingSyntaxTest.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/WriterRenamingSyntaxTest.scala index 97339f1e..e66a8fc6 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/WriterRenamingSyntaxTest.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/WriterRenamingSyntaxTest.scala @@ -27,7 +27,8 @@ class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { implicit val writer: JsonWriter[D] = jsonWriter[D] { describe { WriterBuilder[D] - .update(_.a).withRename("b")(_.toString) + .update(_.a) + .withRename("b")(_.toString) } } @@ -40,7 +41,8 @@ class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { def freeVariableRenaming(name: String): JsonWriter[D] = jsonWriter[D] { describe { WriterBuilder[D] - .update(_.a).withRename(name)(_.toString) + .update(_.a) + .withRename(name)(_.toString) } } @@ -57,7 +59,9 @@ class WriterRenamingSyntaxTest extends AnyFlatSpec with Matchers { implicit val writer: JsonWriter[D] = jsonWriter[D] { describe { WriterBuilder[D] - .update(_.a).withRename("b").fromRoot(d => d.a * 2) + .update(_.a) + .withRename("b") + .fromRoot(d => d.a * 2) } } diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/builder/ReaderDescriptionTest.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/builder/ReaderDescriptionTest.scala index 698c0ac8..13082e01 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/builder/ReaderDescriptionTest.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/builder/ReaderDescriptionTest.scala @@ -11,11 +11,16 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { behavior of "describe" it should "build empty description from empty builder" in { - describe(ReaderBuilder[Foo]) shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq()) + describe(ReaderBuilder[Foo]) shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq() + ) } it should "build description with config" in { - describe(ReaderBuilder[Foo].fieldStyle(FieldStyle.uppercase).strict) shouldBe ReaderDescription[Foo]( + describe( + ReaderBuilder[Foo].fieldStyle(FieldStyle.uppercase).strict + ) shouldBe ReaderDescription[Foo]( ReaderDerivationConfig.withFieldStyle(FieldStyle.uppercase).strict, Seq() ) @@ -26,12 +31,16 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).as[Option[Int]](fun) + .extract(_.a) + .as[Option[Int]](fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldAs("a", fun) - )) + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldAs("a", fun) + ) + ) } it should "build description for ExtractFieldValue operation from lambdas" in { @@ -39,19 +48,23 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(_.b, _.c)(fun) + .extract(_.a) + .from(_.b, _.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from ReaderField's" in { @@ -59,19 +72,23 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String], "c".as[Any])(fun) + .extract(_.a) + .from(Symbol("b").as[String], "c".as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from lambdas and lambdas" in { @@ -79,19 +96,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(_.b).and(_.c)(fun) + .extract(_.a) + .from(_.b) + .and(_.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from lambdas and ReaderField's" in { @@ -99,19 +121,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(_.b).and(Symbol("c").as[Any])(fun) + .extract(_.a) + .from(_.b) + .and(Symbol("c").as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from ReaderField's and lambdas" in { @@ -119,19 +146,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String]).and(_.c)(fun) + .extract(_.a) + .from(Symbol("b").as[String]) + .and(_.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from ReaderField's and ReaderField's" in { @@ -139,19 +171,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String]).and(Symbol("c").as[Any])(fun) + .extract(_.a) + .from(Symbol("b").as[String]) + .and(Symbol("c").as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from lambdas" in { @@ -159,19 +196,23 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(_.b, _.c)(fun) + .extractReader(_.a) + .from(_.b, _.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from ReaderField's" in { @@ -179,19 +220,23 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String], "c".as[Any])(fun) + .extractReader(_.a) + .from(Symbol("b").as[String], "c".as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from lambdas and lambdas" in { @@ -199,19 +244,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(_.b).and(_.c)(fun) + .extractReader(_.a) + .from(_.b) + .and(_.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from lambdas and ReaderField's" in { @@ -219,19 +269,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(_.b).and(Symbol("c").as[Any])(fun) + .extractReader(_.a) + .from(_.b) + .and(Symbol("c").as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from ReaderField's and lambdas" in { @@ -239,19 +294,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String]).and(_.c)(fun) + .extractReader(_.a) + .from(Symbol("b").as[String]) + .and(_.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from ReaderField's and ReaderField's" in { @@ -259,22 +319,26 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String]).and(Symbol("c").as[Any])(fun) + .extractReader(_.a) + .from(Symbol("b").as[String]) + .and(Symbol("c").as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } - } object ReaderDescriptionTest { diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/builder/WriterDescriptionTest.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/builder/WriterDescriptionTest.scala index cc675211..9203bb4a 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/builder/WriterDescriptionTest.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/builder/WriterDescriptionTest.scala @@ -24,10 +24,13 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { WriterBuilder[BuilderTestData] .remove(_.a) .remove(_.inner) - } shouldBe WriterDescription(WriterDerivationConfig.empty, Seq( - BuilderOperation.Remove[BuilderTestData]("a"), - BuilderOperation.Remove[BuilderTestData]("inner") - )) + } shouldBe WriterDescription( + WriterDerivationConfig.empty, + Seq( + BuilderOperation.Remove[BuilderTestData]("a"), + BuilderOperation.Remove[BuilderTestData]("inner") + ) + ) } it should "not compile if we try to remove field from inner class" in { @@ -46,7 +49,8 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { .update(_.a)(_.toString) } - val Seq(u: BuilderOperation.Update[BuilderTestData, Int, String]) = description.operations + val Seq(u: BuilderOperation.Update[BuilderTestData, Int, String]) = + description.operations u.field shouldBe "a" u.fun(1) shouldBe "1" @@ -55,10 +59,12 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { it should "extract update from root operations" in { val description = describe { WriterBuilder[BuilderTestData] - .update(_.a).fromRoot(_.a.toString) + .update(_.a) + .fromRoot(_.a.toString) } - val Seq(u: BuilderOperation.UpdateFromRoot[BuilderTestData, String]) = description.operations + val Seq(u: BuilderOperation.UpdateFromRoot[BuilderTestData, String]) = + description.operations u.field shouldBe "a" u.fun(BuilderTestData(1, "s", c = true, 1L, InnerCls(2))) shouldBe "1" @@ -74,7 +80,8 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { } } - val Seq(up: BuilderOperation.UpdatePartial[BuilderTestData, Int]) = description.operations + val Seq(up: BuilderOperation.UpdatePartial[BuilderTestData, Int]) = + description.operations up.field shouldBe "a" up.fun(1) shouldBe "uno!" @@ -85,14 +92,16 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { it should "extract update partial from root operations" in { val description = describe { WriterBuilder[BuilderTestData] - .updatePartial(_.a).fromRoot { - case d if d.a == 1 => "uno!" - case d if d.a == 2 => 4 - case d => d.a * 3 - } + .updatePartial(_.a) + .fromRoot { + case d if d.a == 1 => "uno!" + case d if d.a == 2 => 4 + case d => d.a * 3 + } } - val Seq(up: BuilderOperation.UpdatePartialFromRoot[BuilderTestData]) = description.operations + val Seq(up: BuilderOperation.UpdatePartialFromRoot[BuilderTestData]) = + description.operations up.field shouldBe "a" @@ -118,19 +127,24 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { operations(1) shouldBe a[BuilderOperation.Update[_, _, _]] - val u = operations(1).asInstanceOf[BuilderOperation.Update[BuilderTestData, Boolean, Boolean]] + val u = operations(1) + .asInstanceOf[BuilderOperation.Update[BuilderTestData, Boolean, Boolean]] u.field shouldBe "c" u.fun(true) shouldBe false operations(2) shouldBe a[BuilderOperation.Add[_, _]] - val add = operations(2).asInstanceOf[BuilderOperation.Add[BuilderTestData, Int]] + val add = + operations(2).asInstanceOf[BuilderOperation.Add[BuilderTestData, Int]] add.field shouldBe "e" add.fun(testData) shouldBe 2 } it should "extract rename" in { - val WriterDescription(_, Seq(op: BuilderOperation.Update[BuilderTestData, Int, Int])) = describe { + val WriterDescription( + _, + Seq(op: BuilderOperation.Update[BuilderTestData, Int, Int]) + ) = describe { WriterBuilder[BuilderTestData].rename(_.a)("aa") } @@ -150,8 +164,8 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { } it should "extract update from root with rename" in { - val fun: PartialFunction[BuilderTestData, Int] = { - case d => d.a + val fun: PartialFunction[BuilderTestData, Int] = { case d => + d.a } describe { @@ -164,10 +178,14 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { object WriterDescriptionTest { - case class BuilderTestData(a: Int, b: String, c: Boolean, d: Long, inner: InnerCls) + case class BuilderTestData( + a: Int, + b: String, + c: Boolean, + d: Long, + inner: InnerCls + ) case class InnerCls(a: Int) } - - diff --git a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/package.scala b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/package.scala index c2852a3c..a5b6837f 100644 --- a/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/package.scala +++ b/modules/macro-derivation/src/test/scala-2.13+/tethys/derivation/package.scala @@ -8,7 +8,6 @@ package object derivation { case class C(d: D) case class D(a: Int) - case class RecursiveType(a: Int, children: Seq[RecursiveType] = Seq.empty) case class ComplexRecursionA(a: Int, b: Option[ComplexRecursionB]) diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithType.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithType.scala index 67d306b8..01667b2c 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithType.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithType.scala @@ -5,4 +5,4 @@ sealed trait ADTWithType[A] object ADTWithType { case class ADTWithTypeA[A](a: A) extends ADTWithType[A] case class ADTWithTypeB[A](a: A, b: ADTWithType[A]) extends ADTWithType[A] -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala index ea278168..66aa5d9e 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/ADTWithWrongType.scala @@ -6,6 +6,7 @@ object ADTWithWrongType { case class ADTWithWrongTypeA[A](a: A) extends ADTWithWrongType[A] - case class ADTWithWrongTypeB[A, B](a: A, b: ADTWithWrongType[B]) extends ADTWithWrongType[A] + case class ADTWithWrongTypeB[A, B](a: A, b: ADTWithWrongType[B]) + extends ADTWithWrongType[A] -} \ No newline at end of file +} diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoReaderDerivationTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoReaderDerivationTest.scala index 1f2e0d7c..8b35fde0 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoReaderDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoReaderDerivationTest.scala @@ -20,18 +20,19 @@ class AutoReaderDerivationTest extends AnyFlatSpec with Matchers { res } - behavior of "auto derivation" it should "derive readers for simple case class hierarchy" in { - read[JsonTreeTestData](obj( - "a" -> 1, - "b" -> true, - "c" -> obj( - "d" -> obj( - "a" -> 2 + read[JsonTreeTestData]( + obj( + "a" -> 1, + "b" -> true, + "c" -> obj( + "d" -> obj( + "a" -> 2 + ) ) ) - )) shouldBe JsonTreeTestData( + ) shouldBe JsonTreeTestData( a = 1, b = true, c = C(D(2)) @@ -39,32 +40,39 @@ class AutoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for recursive type" in { - read[RecursiveType](obj( - "a" -> 1, - "children" -> arr( - obj( - "a" -> 2, - "children" -> arr() - ), - obj( - "a" -> 3, - "children" -> arr() + read[RecursiveType]( + obj( + "a" -> 1, + "children" -> arr( + obj( + "a" -> 2, + "children" -> arr() + ), + obj( + "a" -> 3, + "children" -> arr() + ) ) ) - )) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) + ) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) } it should "derive reader for A => B => A cycle" in { - read[ComplexRecursionA](obj( - "a" -> 1, - "b" -> obj( - "b" -> 2, - "a" -> obj( - "a" -> 3 + read[ComplexRecursionA]( + obj( + "a" -> 1, + "b" -> obj( + "b" -> 2, + "a" -> obj( + "a" -> 3 + ) ) ) - )) shouldBe ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))) + ) shouldBe ComplexRecursionA( + 1, + Some(ComplexRecursionB(2, ComplexRecursionA(3, None))) + ) } it should "derive reader for simple enum" in { diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoWriterDerivationTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoWriterDerivationTest.scala index 3cbbf3ea..00f9a1f8 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoWriterDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/AutoWriterDerivationTest.scala @@ -3,7 +3,7 @@ package tethys.derivation import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec import tethys.commons.TokenNode -import tethys.commons.TokenNode.{value => token,*} +import tethys.commons.TokenNode.{value => token, *} import tethys.derivation.ADTWithType.* import tethys.derivation.auto.* import tethys.derivation.semiauto.* @@ -19,7 +19,7 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { a = 5, b = false, c = C(D(1)) - ).asTokenList shouldBe obj ( + ).asTokenList shouldBe obj( "a" -> 5, "b" -> false, "c" -> obj( @@ -31,15 +31,23 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writers for a lot of embedded classes" in { - Seq(SeqMaster1(Seq(SeqMaster2(Seq(SeqMaster3(Seq(SeqMaster4(Seq(1))))))))).asTokenList shouldBe arr( + Seq( + SeqMaster1(Seq(SeqMaster2(Seq(SeqMaster3(Seq(SeqMaster4(Seq(1)))))))) + ).asTokenList shouldBe arr( obj( - "a" -> arr(obj( - "a" -> arr(obj( - "a" -> arr(obj( - "a" -> arr(1) - )) - )) - )) + "a" -> arr( + obj( + "a" -> arr( + obj( + "a" -> arr( + obj( + "a" -> arr(1) + ) + ) + ) + ) + ) + ) ) ) } @@ -57,7 +65,10 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writer for A => B => A cycle" in { - ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))).asTokenList shouldBe obj( + ComplexRecursionA( + 1, + Some(ComplexRecursionB(2, ComplexRecursionA(3, None))) + ).asTokenList shouldBe obj( "a" -> 1, "b" -> obj( "b" -> 2, @@ -69,7 +80,9 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writer for sealed cyclic trait with type parameter" in { - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[ + Int + ]).asTokenList shouldBe obj( "a" -> 1, "b" -> obj( "a" -> 2 @@ -78,15 +91,19 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writer that normally concatenates with other JsonObjectWriter's" in { - implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonObjectWriter[ADTWithType[B]] = { - val simpleJsonObjectWriter = SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { - case _: ADTWithTypeA[B] => "ADTWithTypeA" - case _: ADTWithTypeB[B] => "ADTWithTypeB" - } + implicit def recursionTraitWithTypeWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithType[B]] = { + val simpleJsonObjectWriter = + SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { + case _: ADTWithTypeA[B] => "ADTWithTypeA" + case _: ADTWithTypeB[B] => "ADTWithTypeB" + } simpleJsonObjectWriter ++ jsonWriter[ADTWithType[B]] } - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[ + Int + ]).asTokenList shouldBe obj( "clazz" -> "ADTWithTypeB", "a" -> 1, "b" -> obj( @@ -101,12 +118,16 @@ class AutoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "auto derive writer for simple sealed trait with hierarchy" in { - implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = JsonWriter.obj[SimpleClass].addField("b")(_.b) - implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj.addField("type")(_ => "JustObject") + implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = + JsonWriter.obj[SimpleClass].addField("b")(_.b) + implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = + JsonWriter.obj.addField("type")(_ => "JustObject") - implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType] + implicit val sealedWriter: JsonWriter[SimpleSealedType] = + jsonWriter[SimpleSealedType] - def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList + def write(simpleSealedType: SimpleSealedType): List[TokenNode] = + simpleSealedType.asTokenList write(CaseClass(1)) shouldBe obj("a" -> 1) write(new SimpleClass(2)) shouldBe obj("b" -> 2) diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/RedundantJsonReaderTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/RedundantJsonReaderTest.scala index eb36f110..b11f392b 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/RedundantJsonReaderTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/RedundantJsonReaderTest.scala @@ -31,13 +31,16 @@ class RedundantJsonReaderTest extends AnyFlatSpec with Matchers { implicit val reader: JsonReader[BaseClass] = jsonReader[BaseClass] { describe { ReaderBuilder[BaseClass] - .extract(_.r).from("intField".as[Int])(RedundantClass.apply) + .extract(_.r) + .from("intField".as[Int])(RedundantClass.apply) } } - read[BaseClass](obj( - "intField" -> 1 - )) shouldBe BaseClass(RedundantClass(1)) + read[BaseClass]( + obj( + "intField" -> 1 + ) + ) shouldBe BaseClass(RedundantClass(1)) } } diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoReaderDerivationTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoReaderDerivationTest.scala index 45480ffe..59aac4c0 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoReaderDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoReaderDerivationTest.scala @@ -5,7 +5,11 @@ import org.scalatest.flatspec.AnyFlatSpec import tethys.JsonReader import tethys.commons.TokenNode.{value => token, *} import tethys.commons.{Token, TokenNode} -import tethys.derivation.builder.{FieldStyle, ReaderBuilder, ReaderDerivationConfig} +import tethys.derivation.builder.{ + FieldStyle, + ReaderBuilder, + ReaderDerivationConfig +} import tethys.derivation.semiauto.* import tethys.readers.ReaderError import tethys.readers.tokens.QueueIterator @@ -21,22 +25,24 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { res } - behavior of "semiauto derivation" it should "derive readers for simple case class hierarchy" in { implicit val dReader: JsonReader[D] = jsonReader[D] implicit val cReader: JsonReader[C] = jsonReader[C] - implicit val jsonTreeTestDataReader: JsonReader[JsonTreeTestData] = jsonReader[JsonTreeTestData] - - read[JsonTreeTestData](obj( - "a" -> 1, - "b" -> true, - "c" -> obj( - "d" -> obj( - "a" -> 2 + implicit val jsonTreeTestDataReader: JsonReader[JsonTreeTestData] = + jsonReader[JsonTreeTestData] + + read[JsonTreeTestData]( + obj( + "a" -> 1, + "b" -> true, + "c" -> obj( + "d" -> obj( + "a" -> 2 + ) ) ) - )) shouldBe JsonTreeTestData( + ) shouldBe JsonTreeTestData( a = 1, b = true, c = C(D(2)) @@ -44,167 +50,212 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for recursive type" in { - implicit val recursiveReader: JsonReader[RecursiveType] = jsonReader[RecursiveType] - - read[RecursiveType](obj( - "a" -> 1, - "children" -> arr( - obj( - "a" -> 2, - "children" -> arr() - ), - obj( - "a" -> 3, - "children" -> arr() + implicit val recursiveReader: JsonReader[RecursiveType] = + jsonReader[RecursiveType] + + read[RecursiveType]( + obj( + "a" -> 1, + "children" -> arr( + obj( + "a" -> 2, + "children" -> arr() + ), + obj( + "a" -> 3, + "children" -> arr() + ) ) ) - )) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) + ) shouldBe RecursiveType(1, Seq(RecursiveType(2), RecursiveType(3))) } it should "derive reader for A => B => A cycle" in { - implicit lazy val testReader1: JsonReader[ComplexRecursionA] = jsonReader[ComplexRecursionA] - implicit lazy val testReader2: JsonReader[ComplexRecursionB] = jsonReader[ComplexRecursionB] - - read[ComplexRecursionA](obj( - "a" -> 1, - "b" -> obj( - "b" -> 2, - "a" -> obj( - "a" -> 3 + implicit lazy val testReader1: JsonReader[ComplexRecursionA] = + jsonReader[ComplexRecursionA] + implicit lazy val testReader2: JsonReader[ComplexRecursionB] = + jsonReader[ComplexRecursionB] + + read[ComplexRecursionA]( + obj( + "a" -> 1, + "b" -> obj( + "b" -> 2, + "a" -> obj( + "a" -> 3 + ) ) ) - )) shouldBe ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))) + ) shouldBe ComplexRecursionA( + 1, + Some(ComplexRecursionB(2, ComplexRecursionA(3, None))) + ) } it should "derive reader for extract as description" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).as[Option[Int]](_.getOrElse(2)) + .extract(_.i) + .as[Option[Int]](_.getOrElse(2)) } } - read[SimpleType](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(1, "str", 1.0) + read[SimpleType]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(1, "str", 1.0) - read[SimpleType](obj( - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(2, "str", 1.0) + read[SimpleType]( + obj( + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(2, "str", 1.0) } it should "derive reader for extract from description" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from(_.s, _.d)((_, _) => 2) + .extract(_.i) + .from(_.s, _.d)((_, _) => 2) } } - read[SimpleType](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(2, "str", 1.0) + read[SimpleType]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(2, "str", 1.0) - read[SimpleType](obj( - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(2, "str", 1.0) + read[SimpleType]( + obj( + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(2, "str", 1.0) } it should "derive reader for extract from description with synthetic field" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from(_.d).and(Symbol("e").as[Double])((d, e) => (d + e).toInt) + .extract(_.i) + .from(_.d) + .and(Symbol("e").as[Double])((d, e) => (d + e).toInt) } } - read[SimpleType](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0, - "e" -> 2.0 - )) shouldBe SimpleType(3, "str", 1.0) + read[SimpleType]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0, + "e" -> 2.0 + ) + ) shouldBe SimpleType(3, "str", 1.0) - read[SimpleType](obj( - "s" -> "str", - "d" -> 1.0, - "e" -> 3.0 - )) shouldBe SimpleType(4, "str", 1.0) + read[SimpleType]( + obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 3.0 + ) + ) shouldBe SimpleType(4, "str", 1.0) } it should "derive reader for extract reader from description" in { - implicit val reader: JsonReader[SimpleTypeWithAny] = jsonReader[SimpleTypeWithAny] { - describe { - ReaderBuilder[SimpleTypeWithAny] - .extractReader(_.any).from(_.d) { - case 1.0 => JsonReader[String] - case 2.0 => JsonReader[Int] + implicit val reader: JsonReader[SimpleTypeWithAny] = + jsonReader[SimpleTypeWithAny] { + describe { + ReaderBuilder[SimpleTypeWithAny] + .extractReader(_.any) + .from(_.d) { + case 1.0 => JsonReader[String] + case 2.0 => JsonReader[Int] + } } } - } - - read[SimpleTypeWithAny](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0, - "any" -> "anyStr" - )) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") - read[SimpleTypeWithAny](obj( - "i" -> 1, - "s" -> "str", - "d" -> 2.0, - "any" -> 2 - )) shouldBe SimpleTypeWithAny(1, "str", 2.0, 2) + read[SimpleTypeWithAny]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0, + "any" -> "anyStr" + ) + ) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") + + read[SimpleTypeWithAny]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 2.0, + "any" -> 2 + ) + ) shouldBe SimpleTypeWithAny(1, "str", 2.0, 2) } it should "derive reader for complex extraction case" in { - implicit val reader: JsonReader[SimpleTypeWithAny] = jsonReader[SimpleTypeWithAny] { - ReaderBuilder[SimpleTypeWithAny] - .extractReader(_.any).from(_.i) { - case 1 => JsonReader[String] - case 2 => JsonReader[Int] - case _ => JsonReader[Option[Boolean]] + implicit val reader: JsonReader[SimpleTypeWithAny] = + jsonReader[SimpleTypeWithAny] { + ReaderBuilder[SimpleTypeWithAny] + .extractReader(_.any) + .from(_.i) { + case 1 => JsonReader[String] + case 2 => JsonReader[Int] + case _ => JsonReader[Option[Boolean]] + } + .extract(_.i) + .from(_.d) + .and(Symbol("e").as[Int])((d, e) => d.toInt + e) + .extract(_.d) + .as[Option[Double]](_.getOrElse(1.0)) } - .extract(_.i).from(_.d).and(Symbol("e").as[Int])((d, e) => d.toInt + e) - .extract(_.d).as[Option[Double]](_.getOrElse(1.0)) - } - - read[SimpleTypeWithAny](obj( - "s" -> "str", - "d" -> 1.0, - "e" -> 0, - "any" -> "anyStr" - )) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") - read[SimpleTypeWithAny](obj( - "s" -> "str", - "e" -> 0, - "any" -> "anyStr" - )) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") - - read[SimpleTypeWithAny](obj( - "s" -> "str", - "d" -> 1.0, - "e" -> 1, - "any" -> 3 - )) shouldBe SimpleTypeWithAny(2, "str", 1.0, 3) + read[SimpleTypeWithAny]( + obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 0, + "any" -> "anyStr" + ) + ) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") - read[SimpleTypeWithAny](obj( - "s" -> "str", - "d" -> 1.0, - "e" -> 2, - "any" -> true - )) shouldBe SimpleTypeWithAny(3, "str", 1.0, Some(true)) + read[SimpleTypeWithAny]( + obj( + "s" -> "str", + "e" -> 0, + "any" -> "anyStr" + ) + ) shouldBe SimpleTypeWithAny(1, "str", 1.0, "anyStr") + + read[SimpleTypeWithAny]( + obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 1, + "any" -> 3 + ) + ) shouldBe SimpleTypeWithAny(2, "str", 1.0, 3) + + read[SimpleTypeWithAny]( + obj( + "s" -> "str", + "d" -> 1.0, + "e" -> 2, + "any" -> true + ) + ) shouldBe SimpleTypeWithAny(3, "str", 1.0, Some(true)) - //FIXME: figure out how to handle this case + // FIXME: figure out how to handle this case /*read[SimpleTypeWithAny](obj( "s" -> "str", "d" -> 1.0, @@ -213,15 +264,18 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for fieldStyle from description" in { - implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames] { - ReaderBuilder[CamelCaseNames].fieldStyle(FieldStyle.LowerSnakeCase) - } + implicit val reader: JsonReader[CamelCaseNames] = + jsonReader[CamelCaseNames] { + ReaderBuilder[CamelCaseNames].fieldStyle(FieldStyle.LowerSnakeCase) + } - read[CamelCaseNames](obj( - "some_param" -> 1, - "id_param" -> 2, - "simple" -> 3 - )) shouldBe CamelCaseNames( + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + ) + ) shouldBe CamelCaseNames( someParam = 1, IDParam = 2, simple = 3 @@ -229,15 +283,18 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for fieldStyle from function in description" in { - implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames] { - ReaderBuilder[CamelCaseNames].fieldStyle(FieldStyle.Capitalize) - } + implicit val reader: JsonReader[CamelCaseNames] = + jsonReader[CamelCaseNames] { + ReaderBuilder[CamelCaseNames].fieldStyle(FieldStyle.Capitalize) + } - read[CamelCaseNames](obj( - "SomeParam" -> 1, - "IDParam" -> 2, - "Simple" -> 3 - )) shouldBe CamelCaseNames( + read[CamelCaseNames]( + obj( + "SomeParam" -> 1, + "IDParam" -> 2, + "Simple" -> 3 + ) + ) shouldBe CamelCaseNames( someParam = 1, IDParam = 2, simple = 3 @@ -248,91 +305,110 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from("i".as[Int])(identity) + .extract(_.i) + .from("i".as[Int])(identity) } } - read[SimpleType](obj( - "i" -> 1, - "s" -> "str", - "d" -> 1.0 - )) shouldBe SimpleType(1, "str", 1.0) + read[SimpleType]( + obj( + "i" -> 1, + "s" -> "str", + "d" -> 1.0 + ) + ) shouldBe SimpleType(1, "str", 1.0) } it should "derive reader for extract field even it described few times" in { implicit val reader: JsonReader[SimpleType] = jsonReader[SimpleType] { describe { ReaderBuilder[SimpleType] - .extract(_.i).from("i".as[Int])(identity) - .extract(_.s).from("i".as[Long])(_.toString) - .extract(_.d).from(_.i)(_.toDouble) + .extract(_.i) + .from("i".as[Int])(identity) + .extract(_.s) + .from("i".as[Long])(_.toString) + .extract(_.d) + .from(_.i)(_.toDouble) } } - read[SimpleType](obj( - "i" -> 1 - )) shouldBe SimpleType(1, "1", 1.0) + read[SimpleType]( + obj( + "i" -> 1 + ) + ) shouldBe SimpleType(1, "1", 1.0) } it should "derive reader for reader config" in { - implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames]( - ReaderDerivationConfig.withFieldStyle(FieldStyle.LowerSnakeCase).strict - ) + implicit val reader: JsonReader[CamelCaseNames] = + jsonReader[CamelCaseNames]( + ReaderDerivationConfig.withFieldStyle(FieldStyle.LowerSnakeCase).strict + ) - read[CamelCaseNames](obj( - "some_param" -> 1, - "id_param" -> 2, - "simple" -> 3 - )) shouldBe CamelCaseNames( + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + ) + ) shouldBe CamelCaseNames( someParam = 1, IDParam = 2, simple = 3 ) (the[ReaderError] thrownBy { - read[CamelCaseNames](obj( - "some_param" -> 1, - "not_id_param" -> 2, - "simple" -> 3 - )) + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "not_id_param" -> 2, + "simple" -> 3 + ) + ) }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'simple', 'id_param', 'some_param'" } it should "derive reader for reader config from builder" in { - implicit val reader: JsonReader[CamelCaseNames] = jsonReader[CamelCaseNames]( - ReaderBuilder[CamelCaseNames] - .strict - .fieldStyle(FieldStyle.LowerSnakeCase) - ) + implicit val reader: JsonReader[CamelCaseNames] = + jsonReader[CamelCaseNames]( + ReaderBuilder[CamelCaseNames].strict + .fieldStyle(FieldStyle.LowerSnakeCase) + ) - read[CamelCaseNames](obj( - "some_param" -> 1, - "id_param" -> 2, - "simple" -> 3 - )) shouldBe CamelCaseNames( + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "id_param" -> 2, + "simple" -> 3 + ) + ) shouldBe CamelCaseNames( someParam = 1, IDParam = 2, simple = 3 ) (the[ReaderError] thrownBy { - read[CamelCaseNames](obj( - "some_param" -> 1, - "not_id_param" -> 2, - "simple" -> 3 - )) + read[CamelCaseNames]( + obj( + "some_param" -> 1, + "not_id_param" -> 2, + "simple" -> 3 + ) + ) }).getMessage shouldBe "Illegal json at '[ROOT]': unexpected field 'not_id_param', expected one of 'simple', 'id_param', 'some_param'" } - it should "derive reader for simple enum" in { - implicit val oneReader: JsonReader[SimpleEnum.ONE.type] = jsonReader[SimpleEnum.ONE.type] - implicit val twoReader: JsonReader[SimpleEnum.TWO.type] = jsonReader[SimpleEnum.TWO.type] - implicit val simpleEnumReader: JsonReader[SimpleEnum] = jsonReader[SimpleEnum] + implicit val oneReader: JsonReader[SimpleEnum.ONE.type] = + jsonReader[SimpleEnum.ONE.type] + implicit val twoReader: JsonReader[SimpleEnum.TWO.type] = + jsonReader[SimpleEnum.TWO.type] + implicit val simpleEnumReader: JsonReader[SimpleEnum] = + jsonReader[SimpleEnum] read[SimpleEnum]( token(SimpleEnum.ONE.toString) - )shouldBe SimpleEnum.ONE + ) shouldBe SimpleEnum.ONE read[SimpleEnum]( token(SimpleEnum.TWO.toString) @@ -340,9 +416,12 @@ class SemiautoReaderDerivationTest extends AnyFlatSpec with Matchers { } it should "derive reader for parametrized enum" in { - implicit val oneReader: JsonReader[ParametrizedEnum.ONE.type] = jsonReader[ParametrizedEnum.ONE.type] - implicit val twoReader: JsonReader[ParametrizedEnum.TWO.type] = jsonReader[ParametrizedEnum.TWO.type] - implicit val parametrizedEnumReader: JsonReader[ParametrizedEnum] = jsonReader[ParametrizedEnum] + implicit val oneReader: JsonReader[ParametrizedEnum.ONE.type] = + jsonReader[ParametrizedEnum.ONE.type] + implicit val twoReader: JsonReader[ParametrizedEnum.TWO.type] = + jsonReader[ParametrizedEnum.TWO.type] + implicit val parametrizedEnumReader: JsonReader[ParametrizedEnum] = + jsonReader[ParametrizedEnum] read[ParametrizedEnum]( token(ParametrizedEnum.ONE.toString) diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoWriterDerivationTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoWriterDerivationTest.scala index f092517e..58dc25bb 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoWriterDerivationTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/SemiautoWriterDerivationTest.scala @@ -4,7 +4,11 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec import tethys.commons.TokenNode import tethys.{JsonObjectWriter, JsonWriter} -import tethys.derivation.builder.{FieldStyle, WriterBuilder, WriterDerivationConfig} +import tethys.derivation.builder.{ + FieldStyle, + WriterBuilder, + WriterDerivationConfig +} import tethys.writers.tokens.SimpleTokenWriter.* import tethys.commons.TokenNode.{value as token, *} import tethys.derivation.ADTWithType.{ADTWithTypeA, ADTWithTypeB} @@ -17,12 +21,14 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { behavior of "semiauto derivation" it should "generate proper writer from WriterDescription" in { def freeVariable: String = "e" - implicit val dWriter: JsonWriter[D] = jsonWriter[D](WriterDerivationConfig.withFieldStyle(FieldStyle.UpperCase)) + implicit val dWriter: JsonWriter[D] = + jsonWriter[D](WriterDerivationConfig.withFieldStyle(FieldStyle.UpperCase)) implicit val testWriter: JsonWriter[JsonTreeTestData] = jsonWriter { WriterBuilder[JsonTreeTestData] .remove(_.b) - .update(_.a).fromRoot(d => d.a.toDouble + d.c.d.a) + .update(_.a) + .fromRoot(d => d.a.toDouble + d.c.d.a) .update(_.c)(_.d) .add("d")(_.a * 2) .add(freeVariable)(_.b) @@ -42,8 +48,8 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { describe { WriterBuilder[D] .updatePartial(_.a) { - case 1 => "uno!" - case 2 => 1 + case 1 => "uno!" + case 2 => 1 case v if v > 0 => v * 2 case _ => throw new IllegalArgumentException("Wrong value!") } @@ -63,10 +69,11 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { implicit val partialWriter: JsonWriter[D] = jsonWriter { describe { WriterBuilder[D] - .updatePartial(_.a).fromRoot { + .updatePartial(_.a) + .fromRoot { case d if d.a == 1 => "uno!" case d if d.a == 2 => 1 - case d if d.a > 0 => d.a * 2 + case d if d.a > 0 => d.a * 2 case _ => throw new IllegalArgumentException("Wrong value!") } } @@ -86,7 +93,8 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for recursive type" in { - implicit lazy val testWriter: JsonWriter[RecursiveType] = jsonWriter[RecursiveType] + implicit lazy val testWriter: JsonWriter[RecursiveType] = + jsonWriter[RecursiveType] RecursiveType(1, Seq(RecursiveType(2))).asTokenList shouldBe obj( "a" -> 1, @@ -100,10 +108,15 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for A => B => A cycle" in { - implicit lazy val testWriter1: JsonWriter[ComplexRecursionA] = jsonWriter[ComplexRecursionA] - implicit lazy val testWriter2: JsonWriter[ComplexRecursionB] = jsonWriter[ComplexRecursionB] - - ComplexRecursionA(1, Some(ComplexRecursionB(2, ComplexRecursionA(3, None)))).asTokenList shouldBe obj( + implicit lazy val testWriter1: JsonWriter[ComplexRecursionA] = + jsonWriter[ComplexRecursionA] + implicit lazy val testWriter2: JsonWriter[ComplexRecursionB] = + jsonWriter[ComplexRecursionB] + + ComplexRecursionA( + 1, + Some(ComplexRecursionB(2, ComplexRecursionA(3, None))) + ).asTokenList shouldBe obj( "a" -> 1, "b" -> obj( "b" -> 2, @@ -115,11 +128,16 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for sealed cyclic trait with type parameter" in { - implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonObjectWriter[ADTWithType[B]] = jsonWriter[ADTWithType[B]] - implicit def recursionTraitWithTypeAWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeA[B]] = jsonWriter[ADTWithTypeA[B]] - implicit def recursionTraitWithTypeBWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeB[B]] = jsonWriter[ADTWithTypeB[B]] - - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + implicit def recursionTraitWithTypeWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithType[B]] = jsonWriter[ADTWithType[B]] + implicit def recursionTraitWithTypeAWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithTypeA[B]] = jsonWriter[ADTWithTypeA[B]] + implicit def recursionTraitWithTypeBWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithTypeB[B]] = jsonWriter[ADTWithTypeB[B]] + + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[ + Int + ]).asTokenList shouldBe obj( "a" -> 1, "b" -> obj( "a" -> 2 @@ -128,19 +146,25 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer that normally concatenates with other JsonWriter's" in { - implicit def recursionTraitWithTypeWriter[B: JsonWriter]: JsonWriter[ADTWithType[B]] = { - val simpleJsonWriter = SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { - case _: ADTWithTypeA[B] => "ADTWithTypeA" - case _: ADTWithTypeB[B] => "ADTWithTypeB" - } + implicit def recursionTraitWithTypeWriter[B: JsonWriter] + : JsonWriter[ADTWithType[B]] = { + val simpleJsonWriter = + SimpleJsonObjectWriter[ADTWithType[B]].addField("clazz") { + case _: ADTWithTypeA[B] => "ADTWithTypeA" + case _: ADTWithTypeB[B] => "ADTWithTypeB" + } simpleJsonWriter ++ jsonWriter[ADTWithType[B]] } - implicit def recursionTraitWithTypeAWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeA[B]] = jsonWriter[ADTWithTypeA[B]] + implicit def recursionTraitWithTypeAWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithTypeA[B]] = jsonWriter[ADTWithTypeA[B]] - implicit def recursionTraitWithTypeBWriter[B: JsonWriter]: JsonObjectWriter[ADTWithTypeB[B]] = jsonWriter[ADTWithTypeB[B]] + implicit def recursionTraitWithTypeBWriter[B: JsonWriter] + : JsonObjectWriter[ADTWithTypeB[B]] = jsonWriter[ADTWithTypeB[B]] - (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[Int]).asTokenList shouldBe obj( + (ADTWithTypeB[Int](1, ADTWithTypeA[Int](2)): ADTWithType[ + Int + ]).asTokenList shouldBe obj( "clazz" -> "ADTWithTypeB", "a" -> 1, "b" -> obj( @@ -159,14 +183,20 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for simple sealed trait with hierarchy" in { - implicit val caseClassWriter: JsonObjectWriter[CaseClass] = jsonWriter[CaseClass] - implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = JsonWriter.obj[SimpleClass].addField("b")(_.b) - implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj.addField("type")(_ => "JustObject") - implicit val subChildWriter: JsonObjectWriter[SubChild] = jsonWriter[SubChild] + implicit val caseClassWriter: JsonObjectWriter[CaseClass] = + jsonWriter[CaseClass] + implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = + JsonWriter.obj[SimpleClass].addField("b")(_.b) + implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = + JsonWriter.obj.addField("type")(_ => "JustObject") + implicit val subChildWriter: JsonObjectWriter[SubChild] = + jsonWriter[SubChild] - implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType] + implicit val sealedWriter: JsonWriter[SimpleSealedType] = + jsonWriter[SimpleSealedType] - def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList + def write(simpleSealedType: SimpleSealedType): List[TokenNode] = + simpleSealedType.asTokenList write(CaseClass(1)) shouldBe obj("a" -> 1) write(new SimpleClass(2)) shouldBe obj("b" -> 2) @@ -175,16 +205,22 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for simple sealed trait with hierarchy with discriminator" in { - implicit val caseClassWriter: JsonObjectWriter[CaseClass] = jsonWriter[CaseClass] - implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = JsonWriter.obj[SimpleClass].addField("b")(_.b) - implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = JsonWriter.obj - implicit val subChildWriter: JsonObjectWriter[SubChild] = jsonWriter[SubChild] - - implicit val sealedWriter: JsonWriter[SimpleSealedType] = jsonWriter[SimpleSealedType]( - WriterDerivationConfig.empty.withDiscriminator("__type") - ) + implicit val caseClassWriter: JsonObjectWriter[CaseClass] = + jsonWriter[CaseClass] + implicit val simpleClassWriter: JsonObjectWriter[SimpleClass] = + JsonWriter.obj[SimpleClass].addField("b")(_.b) + implicit val justObjectWriter: JsonObjectWriter[JustObject.type] = + JsonWriter.obj + implicit val subChildWriter: JsonObjectWriter[SubChild] = + jsonWriter[SubChild] + + implicit val sealedWriter: JsonWriter[SimpleSealedType] = + jsonWriter[SimpleSealedType]( + WriterDerivationConfig.empty.withDiscriminator("__type") + ) - def write(simpleSealedType: SimpleSealedType): List[TokenNode] = simpleSealedType.asTokenList + def write(simpleSealedType: SimpleSealedType): List[TokenNode] = + simpleSealedType.asTokenList write(CaseClass(1)) shouldBe obj("a" -> 1, "__type" -> "CaseClass") write(new SimpleClass(2)) shouldBe obj("b" -> 2, "__type" -> "SimpleClass") @@ -193,42 +229,54 @@ class SemiautoWriterDerivationTest extends AnyFlatSpec with Matchers { } it should "derive writer for simple enum" in { - implicit val oneWriter: JsonObjectWriter[SimpleEnum.ONE.type] = jsonWriter[SimpleEnum.ONE.type] - implicit val twoWriter: JsonObjectWriter[SimpleEnum.TWO.type] = jsonWriter[SimpleEnum.TWO.type] - implicit val simpleEnumWriter: JsonWriter[SimpleEnum] = jsonWriter[SimpleEnum] - + implicit val oneWriter: JsonObjectWriter[SimpleEnum.ONE.type] = + jsonWriter[SimpleEnum.ONE.type] + implicit val twoWriter: JsonObjectWriter[SimpleEnum.TWO.type] = + jsonWriter[SimpleEnum.TWO.type] + implicit val simpleEnumWriter: JsonWriter[SimpleEnum] = + jsonWriter[SimpleEnum] + SimpleEnum.ONE.asTokenList shouldBe token("ONE") SimpleEnum.TWO.asTokenList shouldBe token("TWO") } it should "derive writer for parametrized enum" in { - implicit val oneWriter: JsonObjectWriter[ParametrizedEnum.ONE.type] = jsonWriter[ParametrizedEnum.ONE.type] - implicit val twoWriter: JsonObjectWriter[ParametrizedEnum.TWO.type] = jsonWriter[ParametrizedEnum.TWO.type] - implicit val parametrizedEnumWriter: JsonWriter[ParametrizedEnum] = jsonWriter[ParametrizedEnum] + implicit val oneWriter: JsonObjectWriter[ParametrizedEnum.ONE.type] = + jsonWriter[ParametrizedEnum.ONE.type] + implicit val twoWriter: JsonObjectWriter[ParametrizedEnum.TWO.type] = + jsonWriter[ParametrizedEnum.TWO.type] + implicit val parametrizedEnumWriter: JsonWriter[ParametrizedEnum] = + jsonWriter[ParametrizedEnum] ParametrizedEnum.ONE.asTokenList shouldBe token("ONE") ParametrizedEnum.TWO.asTokenList shouldBe token("TWO") } it should "derive writer with discriminator for simple enum" in { - implicit val oneWriter: JsonObjectWriter[SimpleEnum.ONE.type] = jsonWriter[SimpleEnum.ONE.type] - implicit val twoWriter: JsonObjectWriter[SimpleEnum.TWO.type] = jsonWriter[SimpleEnum.TWO.type] - implicit val simpleEnumWriter: JsonWriter[SimpleEnum] = jsonWriter[SimpleEnum]( - WriterDerivationConfig.empty.withDiscriminator("__type") - ) + implicit val oneWriter: JsonObjectWriter[SimpleEnum.ONE.type] = + jsonWriter[SimpleEnum.ONE.type] + implicit val twoWriter: JsonObjectWriter[SimpleEnum.TWO.type] = + jsonWriter[SimpleEnum.TWO.type] + implicit val simpleEnumWriter: JsonWriter[SimpleEnum] = + jsonWriter[SimpleEnum]( + WriterDerivationConfig.empty.withDiscriminator("__type") + ) SimpleEnum.ONE.asTokenList shouldBe obj("__type" -> "ONE") SimpleEnum.TWO.asTokenList shouldBe obj("__type" -> "TWO") } it should "derive writer with discriminator for parametrized enum" in { - implicit val oneWriter: JsonObjectWriter[ParametrizedEnum.ONE.type] = jsonWriter[ParametrizedEnum.ONE.type] - implicit val twoWriter: JsonObjectWriter[ParametrizedEnum.TWO.type] = jsonWriter[ParametrizedEnum.TWO.type] - implicit val simpleEnumWriter: JsonWriter[ParametrizedEnum] = jsonWriter[ParametrizedEnum]( - WriterDerivationConfig.empty.withDiscriminator("__type") - ) + implicit val oneWriter: JsonObjectWriter[ParametrizedEnum.ONE.type] = + jsonWriter[ParametrizedEnum.ONE.type] + implicit val twoWriter: JsonObjectWriter[ParametrizedEnum.TWO.type] = + jsonWriter[ParametrizedEnum.TWO.type] + implicit val simpleEnumWriter: JsonWriter[ParametrizedEnum] = + jsonWriter[ParametrizedEnum]( + WriterDerivationConfig.empty.withDiscriminator("__type") + ) - ParametrizedEnum.ONE.asTokenList shouldBe obj ("__type" -> "ONE") - ParametrizedEnum.TWO.asTokenList shouldBe obj ("__type" -> "TWO") + ParametrizedEnum.ONE.asTokenList shouldBe obj("__type" -> "ONE") + ParametrizedEnum.TWO.asTokenList shouldBe obj("__type" -> "TWO") } } diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/ReaderDescriptionTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/ReaderDescriptionTest.scala index b9fbfea8..2537940f 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/ReaderDescriptionTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/ReaderDescriptionTest.scala @@ -4,7 +4,11 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec import tethys.JsonReader import tethys.derivation.builder.ReaderDescription.BuilderOperation -import tethys.derivation.builder.{FieldStyle, ReaderDerivationConfig, ReaderDescription} +import tethys.derivation.builder.{ + FieldStyle, + ReaderDerivationConfig, + ReaderDescription +} import tethys.derivation.builder.ReaderDescriptionTest.Foo import tethys.derivation.semiauto.* @@ -13,11 +17,16 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { behavior of "describe" it should "build empty description from empty builder" in { - describe(ReaderBuilder[Foo]) shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq()) + describe(ReaderBuilder[Foo]) shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq() + ) } it should "build description with config" in { - describe(ReaderBuilder[Foo].fieldStyle(FieldStyle.UpperCase).strict) shouldBe ReaderDescription[Foo]( + describe( + ReaderBuilder[Foo].fieldStyle(FieldStyle.UpperCase).strict + ) shouldBe ReaderDescription[Foo]( ReaderDerivationConfig.withFieldStyle(FieldStyle.UpperCase).strict, Seq() ) @@ -28,12 +37,16 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).as[Option[Int]](fun) + .extract(_.a) + .as[Option[Int]](fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - BuilderOperation.ExtractFieldAs("a", fun) - )) + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + BuilderOperation.ExtractFieldAs("a", fun) + ) + ) } it should "build description for ExtractFieldValue operation from lambdas" in { @@ -41,19 +54,23 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(_.b, _.c)(fun) + .extract(_.a) + .from(_.b, _.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from ReaderField's" in { @@ -61,19 +78,23 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String], "c".as[Any])(fun) + .extract(_.a) + .from(Symbol("b").as[String], "c".as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from lambdas and lambdas" in { @@ -81,19 +102,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(_.b).and(_.c)(fun) + .extract(_.a) + .from(_.b) + .and(_.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from lambdas and ReaderField's" in { @@ -101,19 +127,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(_.b).and(Symbol("c").as[Any])(fun) + .extract(_.a) + .from(_.b) + .and(Symbol("c").as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from ReaderField's and lambdas" in { @@ -121,19 +152,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String]).and(_.c)(fun) + .extract(_.a) + .from(Symbol("b").as[String]) + .and(_.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldValue operation from ReaderField's and ReaderField's" in { @@ -141,19 +177,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extract(_.a).from(Symbol("b").as[String]).and(Symbol("c").as[Any])(fun) + .extract(_.a) + .from(Symbol("b").as[String]) + .and(Symbol("c").as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldValue( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldValue( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from lambdas" in { @@ -161,19 +202,23 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(_.b, _.c)(fun) + .extractReader(_.a) + .from(_.b, _.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from ReaderField's" in { @@ -181,19 +226,23 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String], "c".as[Any])(fun) + .extractReader(_.a) + .from(Symbol("b").as[String], "c".as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from lambdas and lambdas" in { @@ -201,19 +250,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(_.b).and(_.c)(fun) + .extractReader(_.a) + .from(_.b) + .and(_.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from lambdas and ReaderField's" in { @@ -221,19 +275,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(_.b).and(Symbol("c").as[Any])(fun) + .extractReader(_.a) + .from(_.b) + .and(Symbol("c").as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.ClassField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.ClassField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from ReaderField's and lambdas" in { @@ -241,19 +300,24 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String]).and(_.c)(fun) + .extractReader(_.a) + .from(Symbol("b").as[String]) + .and(_.c)(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.ClassField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.ClassField[Any]("c") + ), + fun = fun + ) ) - )) + ) } it should "build description for ExtractFieldReader operation from ReaderField's and ReaderField's" in { @@ -261,22 +325,26 @@ class ReaderDescriptionTest extends AnyFlatSpec with Matchers { val description = describe { ReaderBuilder[Foo] - .extractReader(_.a).from(Symbol("b").as[String]).and(Symbol("c").as[Any])(fun) + .extractReader(_.a) + .from(Symbol("b").as[String]) + .and(Symbol("c").as[Any])(fun) } - description shouldBe ReaderDescription[Foo](ReaderDerivationConfig.empty, Seq( - ReaderDescription.BuilderOperation.ExtractFieldReader( - field = "a", - from = Seq( - ReaderDescription.Field.RawField[String]("b"), - ReaderDescription.Field.RawField[Any]("c") - ), - fun = fun + description shouldBe ReaderDescription[Foo]( + ReaderDerivationConfig.empty, + Seq( + ReaderDescription.BuilderOperation.ExtractFieldReader( + field = "a", + from = Seq( + ReaderDescription.Field.RawField[String]("b"), + ReaderDescription.Field.RawField[Any]("c") + ), + fun = fun + ) ) - )) + ) } - } object ReaderDescriptionTest { diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/WriterDescriptionTest.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/WriterDescriptionTest.scala index 864b2ef9..91f38253 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/WriterDescriptionTest.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/builder/WriterDescriptionTest.scala @@ -50,7 +50,8 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { .update(_.a)(_.toString) } - val Seq(u: BuilderOperation.Update[BuilderTestData, Int, String]) = description.operations: @unchecked + val Seq(u: BuilderOperation.Update[BuilderTestData, Int, String]) = + description.operations: @unchecked u.field shouldBe "a" u.fun(1) shouldBe "1" @@ -143,7 +144,10 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { } it should "extract rename" in { - val WriterDescription(_, Seq(op: BuilderOperation.Update[BuilderTestData, Int, Int])) = describe { + val WriterDescription( + _, + Seq(op: BuilderOperation.Update[BuilderTestData, Int, Int]) + ) = describe { WriterBuilder[BuilderTestData].rename(_.a)("aa") }: @unchecked @@ -176,7 +180,13 @@ class WriterDescriptionTest extends AnyFlatSpec with Matchers { } object WriterDescriptionTest { - case class BuilderTestData(a: Int, b: String, c: Boolean, d: Long, inner: InnerCls) + case class BuilderTestData( + a: Int, + b: String, + c: Boolean, + d: Long, + inner: InnerCls + ) case class InnerCls(a: Int) } diff --git a/modules/macro-derivation/src/test/scala-3/tethys/derivation/package.scala b/modules/macro-derivation/src/test/scala-3/tethys/derivation/package.scala index 5a5068b2..61e97078 100644 --- a/modules/macro-derivation/src/test/scala-3/tethys/derivation/package.scala +++ b/modules/macro-derivation/src/test/scala-3/tethys/derivation/package.scala @@ -8,7 +8,6 @@ package object derivation { case class C(d: D) case class D(a: Int) - case class RecursiveType(a: Int, children: Seq[RecursiveType] = Seq.empty) case class ComplexRecursionA(a: Int, b: Option[ComplexRecursionB]) diff --git a/modules/refined/src/main/scala/tethys/refined/TethysRefinedInstances.scala b/modules/refined/src/main/scala/tethys/refined/TethysRefinedInstances.scala index 103a23f6..d9564674 100644 --- a/modules/refined/src/main/scala/tethys/refined/TethysRefinedInstances.scala +++ b/modules/refined/src/main/scala/tethys/refined/TethysRefinedInstances.scala @@ -6,26 +6,31 @@ import tethys.readers.tokens.TokenIterator import tethys.{JsonReader, JsonWriter} trait TethysRefinedInstances { - implicit final def RefinedJsonWriter[T: JsonWriter, P, F[_, _]: RefType]: JsonWriter[F[T, P]] = + implicit final def RefinedJsonWriter[T: JsonWriter, P, F[_, _]: RefType] + : JsonWriter[F[T, P]] = JsonWriter[T].contramap(RefType[F].unwrap) implicit final def RefinedJsonReader[T: JsonReader, P, F[_, _]: RefType]( - implicit validate: Validate[T, P] + implicit validate: Validate[T, P] ): JsonReader[F[T, P]] = new JsonReader[F[T, P]] { - override def read(it: TokenIterator)(implicit fieldName: FieldName): F[T, P] = + override def read(it: TokenIterator)(implicit + fieldName: FieldName + ): F[T, P] = fromEither(RefType[F].refine(JsonReader[T].read(it))) } - implicit final def RefinedKeyReader[T, P, F[_, _]: RefType]( - implicit reader: KeyReader[T], - validate: Validate[T, P] + implicit final def RefinedKeyReader[T, P, F[_, _]: RefType](implicit + reader: KeyReader[T], + validate: Validate[T, P] ): KeyReader[F[T, P]] = new KeyReader[F[T, P]] { override def read(s: String)(implicit fieldName: FieldName): F[T, P] = fromEither(RefType[F].refine(reader.read(s))) } - private def fromEither[A](either: Either[String, A])(implicit fieldName: FieldName): A = + private def fromEither[A]( + either: Either[String, A] + )(implicit fieldName: FieldName): A = either match { case Right(value) => value case Left(err) => ReaderError.wrongJson(s"Refined error: $err") diff --git a/modules/refined/src/test/scala/tethys/refined/RefinedSupportTest.scala b/modules/refined/src/test/scala/tethys/refined/RefinedSupportTest.scala index cfacba6f..64777a24 100644 --- a/modules/refined/src/test/scala/tethys/refined/RefinedSupportTest.scala +++ b/modules/refined/src/test/scala/tethys/refined/RefinedSupportTest.scala @@ -133,10 +133,15 @@ class RefinedSupportTest extends AnyFlatSpec with Matchers { it should "work with refined strings" in { type Limits = Map[String Refined IPv4, Int] - val limits: Limits = Map(refineV[IPv4].unsafeFrom("192.168.0.1") -> 1, refineV[IPv4].unsafeFrom("192.168.1.1") -> 2) + val limits: Limits = Map( + refineV[IPv4].unsafeFrom("192.168.0.1") -> 1, + refineV[IPv4].unsafeFrom("192.168.1.1") -> 2 + ) obj("192.168.0.1" -> 1, "192.168.1.1" -> 2).tokensAs[Limits] shouldBe limits - assertThrows[ReaderError](obj("192.168.0.1" -> 1, "192.168.256.1" -> 2).tokensAs[Limits]) + assertThrows[ReaderError]( + obj("192.168.0.1" -> 1, "192.168.256.1" -> 2).tokensAs[Limits] + ) } } diff --git a/project/JsonReaderBuilderGenerator.scala b/project/JsonReaderBuilderGenerator.scala index 1eff962b..e9a52801 100644 --- a/project/JsonReaderBuilderGenerator.scala +++ b/project/JsonReaderBuilderGenerator.scala @@ -2,12 +2,10 @@ import sbt._ object JsonReaderBuilderGenerator { private val packageName = "readers" - + def gen(dir: File): Unit = { val targetFile = dir / "tethys" / packageName / "JsonReaderBuilder.scala" - + } - - - + } diff --git a/project/plugins.sbt b/project/plugins.sbt index 70cb7b59..60ae4da0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,3 @@ -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.4") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.18") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") \ No newline at end of file +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.4") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.18") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")