Reflection/List properties: Difference between revisions

(Scala contribution added.)
Line 558:
=={{header|Scala}}==
===Java Interoperability===
{{Out}}Best seen running in your browser [https://scastie.scala-lang.org/PYo43XQwT4atvLtzNfvY3gMdkPxH6yTlS4W8TaXYxSgA Scastie (remote JVM)].
<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.
Anonymous user