Class TableBuilder


  • public final class TableBuilder
    extends java.lang.Object
    A Java-shim over Picnic's Table.Builder providing a improved API and accessibility from Scala (and probably further JVM-based languages).

    The Scala incompatibility of Table.Builder comes from the fact that Scala does not seem to understand Kotlins @set:JvmSynthetic annotation. And since this annotation is used in Picnic to hide Kotlin setter methods from Java (and, in turn from Scala), the Scala compiler fails to resolve a method reference:

     
     [error] Example.scala:37:14: ambiguous reference to overloaded definition,
     [error] both method setColumnSpan in class TableBuilder of type (x$1: Int): com.jakewharton.picnic.Cell.Builder
     [error] and  method setColumnSpan in class TableBuilder of type (x$1: Int): Unit
     [error] match argument types (Int)
     [error]             .setColumnSpan(4)