Anonymous user
Reflection/List properties: Difference between revisions
→Java Interoperability
(Scala contribution added.) |
|||
Line 558:
=={{header|Scala}}==
===Java Interoperability===
{{Out}}Best seen running in your browser [https://scastie.scala-lang.org/
<lang Scala>object ListProperties extends App {
private val obj = new {
Line 572:
clazz.getDeclaredFields.foreach(f => println(s"${f}}"))
}</lang>
=={{header|Tcl}}==
Tcl objects do not have properties exactly (externally visible variables), though a common idiom pioneered by <b>Tk</b> is <i>options</i> exposed by the <tt>configure</tt> and <tt>cget</tt> commands.
|