Generics changed to call getCanonicalName instead of getName so that
inner class names does not get generated with the $ inside