Skip to content

Commit

Permalink
Binding pretty-print
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-ramazanov committed Jun 27, 2024
1 parent 40ac972 commit 364431a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion modules/interface/src/main/scala/Binding.scala
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,18 @@ object Binding {
flavour: Option[Flavour] = None,
scalaFile: String,
cFile: String
)
) {
override def toString(): String =
classOf[BindingArgs]
.getDeclaredFields()
.map(field => field.getName())
.toList
.zip(productIterator.toList)
.map { case (name, value) =>
s"$name = $value"
}
.mkString(productPrefix + "(", ", ", ")")
}

private[interface] object Defaults {
val linkName = None
Expand Down

0 comments on commit 364431a

Please sign in to comment.