File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed
src/compiler/scala/tools/nsc/backend/jvm Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -1108,7 +1108,7 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
11081108
11091109 constructor.visitVarInsn(asm.Opcodes .ALOAD , 0 )
11101110 // push the class
1111- constructor.visitLdcInsn(exemplar(cls).c)
1111+ constructor.visitLdcInsn(exemplar(cls).c.toASMType )
11121112
11131113 // push the string array of field information
11141114 constructor.visitLdcInsn(new java.lang.Integer (fieldList.length))
Original file line number Diff line number Diff line change 1+ property descriptors
2+ x -- int -- public int p.C.x() -- null
3+ y -- class java.lang.String -- public java.lang.String p.C.y() -- public void p.C.y_$eq(java.lang.String)
4+ z -- class scala.collection.immutable.List -- public scala.collection.immutable.List p.C.z() -- public void p.C.z_$eq(scala.collection.immutable.List)
5+ method descriptors
6+ f -- public p.C p.C.f()
Original file line number Diff line number Diff line change 1+ package p
2+
3+ @ scala.beans.BeanInfo
4+ class C {
5+ val x : Int = 0
6+ var y : String = " "
7+ var z : List [_] = Nil
8+ def f : C = ???
9+ }
Original file line number Diff line number Diff line change 1+ object Test extends App {
2+ val info = java.beans.Introspector .getBeanInfo(classOf [p.C ])
3+
4+ println(" property descriptors" )
5+
6+ val pds = info.getPropertyDescriptors
7+ for (pd <- pds) {
8+ println(s " ${pd.getName} -- ${pd.getPropertyType} -- ${pd.getReadMethod} -- ${pd.getWriteMethod}" )
9+ }
10+
11+ println(" method descriptors" )
12+
13+ val mds = info.getMethodDescriptors
14+ for (md <- mds) {
15+ println(s " ${md.getName} -- ${md.getMethod}" )
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments