[java] Fix difference between how Java and Haxe see Class<>