summaryrefslogtreecommitdiff
path: root/test/files/jvm/beanInfo
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2014-05-13 21:17:50 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2014-05-13 21:17:50 +0200
commitc763d8413b8e1ef5129378952b2327e8a7c2de7d (patch)
tree5bacd568c182fae72d5a6dddbc6c7fe0f0d4e96d /test/files/jvm/beanInfo
parentea166087ce3fe2731a8b0d767cbbd4c5e5e648c1 (diff)
parentfa2204e1749b21aa838350f321d5d85644be4ecf (diff)
downloadscala-c763d8413b8e1ef5129378952b2327e8a7c2de7d.tar.gz
scala-c763d8413b8e1ef5129378952b2327e8a7c2de7d.tar.bz2
scala-c763d8413b8e1ef5129378952b2327e8a7c2de7d.zip
Merge pull request #3745 from lrytz/t8582
SI-8582 emit InnerClasses attribute in GenBCode
Diffstat (limited to 'test/files/jvm/beanInfo')
-rw-r--r--test/files/jvm/beanInfo/C_1.scala9
-rw-r--r--test/files/jvm/beanInfo/Test_2.scala17
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/jvm/beanInfo/C_1.scala b/test/files/jvm/beanInfo/C_1.scala
new file mode 100644
index 0000000000..a338abea1d
--- /dev/null
+++ b/test/files/jvm/beanInfo/C_1.scala
@@ -0,0 +1,9 @@
+package p
+
+@scala.beans.BeanInfo
+class C {
+ val x: Int = 0
+ var y: String = ""
+ var z: List[_] = Nil
+ def f: C = ???
+}
diff --git a/test/files/jvm/beanInfo/Test_2.scala b/test/files/jvm/beanInfo/Test_2.scala
new file mode 100644
index 0000000000..fa9b6e1391
--- /dev/null
+++ b/test/files/jvm/beanInfo/Test_2.scala
@@ -0,0 +1,17 @@
+object Test extends App {
+ val info = java.beans.Introspector.getBeanInfo(classOf[p.C])
+
+ println("property descriptors")
+
+ val pds = info.getPropertyDescriptors
+ for (pd <- pds) {
+ println(s"${pd.getName} -- ${pd.getPropertyType} -- ${pd.getReadMethod} -- ${pd.getWriteMethod}")
+ }
+
+ println("method descriptors")
+
+ val mds = info.getMethodDescriptors
+ for (md <- mds) {
+ println(s"${md.getName} -- ${md.getMethod}")
+ }
+}