java.lang.classfile.TypeKind has a few problems:
1. inconsistent method names newarraycode() and fromNewArrayCode(int)
2. fromDescriptor(String) can throw IndexOutOfBoundsException instead of always throwing IllegalArgumentException
3. from(TypeDescriptor.OfField) is slow for Class objects for reference types.
Proposed improvements:
1. Rename the methods to newarrayCode and fromNewarrayCode, `newarray` is a bytecode name and is a word like `invokestatic`.
2. Change fromDescriptor to throw IAE for 0-length input Strings
3. Update implementation to speed up from() when provided a Class object