question: @ Interruptible @ Pure public static void validateAsTypeDescriptor ( String s ) throws IllegalArgumentException { char [ ] val = s . toCharArray ( ) ; int i = 0 ; if ( val . length == 0 ) { malformed ( "is the empty string" , s ) ; } while ( val [ i ] == '[' ) { if ( ++ i >= val . length ) { malformed ( "has just '[' chars" , s ) ; } } 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 ) ; } }
target:  Validates that the given String is a valid type descriptor.