if (VM.VerifyAssertions) VM._assert(i < val.length);  if (val[i] == VoidTypeCode && i != 0) malformed("can't have an array of void", s);  if (isJavaPrimitive(val[i]))        {  if ( i != val.length - 1)  malformed("nothing should follow the primitive typecode '" + Character.toString(val[i]) + "'", s); return; }   if (VM.VerifyAssertions) VM._assert(val[i] != '[' && !isJavaPrimitive(val[i]));  if (val[i] != ClassTypeCode) malformed("unknown character '" + Character.toString(val[i]) + "'", s); if (!isJavaClassNameInternalForm(val, i, val.length - 1)) malformed("doesn't end with a valid class name in internal form", s);
  public static void validateAsTypeDescriptor(String s)     throws IllegalArgumentException,           InterruptiblePragma  {    char val[] = s.toCharArray();        int i = 0;    if (val.length == 0)      malformed("is the empty string", s);    // array dimensions precede the rest.    while (val[i] == '[') {      if (++i >= val.length)        malformed("has just '[' chars", s);    }    if (VM.VerifyAssertions)     // logically impossible:      VM._assert(i < val.length);    if (val[i] == VoidTypeCode && i != 0)      malformed("can't have an array of void", s);    if (isJavaPrimitive(val[i]))        {      // A primitive should be just 1 char long      if ( i != val.length - 1)        // if this isn't the last character, scream.        malformed("nothing should follow the primitive typecode '"                   + Character.toString(val[i]) + "'", s);      return;                   // otherwise all is well.    }    // logically impossible:    if (VM.VerifyAssertions)       VM._assert(val[i] != '[' && !isJavaPrimitive(val[i]));    // All that's left is ClassTypeCode    if (val[i] != ClassTypeCode)      malformed("unknown character '"                + Character.toString(val[i]) + "'", s);    if (!isJavaClassNameInternalForm(val, i, val.length - 1))      malformed("doesn't end with a valid class name in internal form", s);  }