When the jdk.jfr.internal.MetadataReader class creates annotation elements, it needs to map between the textual name, i.e. "int", to a primitive array class, i.e int[]. Instead of a large switch statement, this can now be done with Class.forPrimitiveName(String) introduced in JDK 22 and the java.lang.reflect.Array class.