I'm afraid I can't supply details of the particula...
# announcements
d
I'm afraid I can't supply details of the particular class whose constructors are being enumerated here, but - nothing in this code looks like it should ever throw an NPE:
Copy code
val Class<*>.desc: String
    get() {
        if (this == Void.TYPE) return "V"
        // This is a clever exploitation of a format returned by Class.getName(): for arrays, it's almost an internal name,
        // but with '.' instead of '/'
        return createArrayType().name.substring(1).replace('.', '/')
    }

fun Class<*>.createArrayType(): Class<*> =
        Array.newInstance(this, 0)::class.java