Closed marlow-fawn closed 5 months ago
I believe this is an edge case. JClass is a front end for the class accessor but is not actually a Java class itself as it must exist before the JVM is started. I believe what you want is actually something more like.
classArray = JArray(java.lang.Class)
or
classArray = java.lang.Class[:]
In other words as the error message is indicating JArray expects an actually Java class. I tested a few different combinations. It does appear that JString, JObject, and the primitive types work as they have special logic to look up the required type. It may be possible to add the same logic to JClass, though I am not sure it is worth the effort as arrays of classes is a fairly rare case.
Using java.lang.Class
is what I wanted and fixes the issue, thank you!
Trying to create an array of classes, getting the following errors:
JClass does seem to be in types.py, and _toJavaClass seems to properly return JClass. Is there something improper in how I'm forming this array?