public static int getArgumentsAndReturnSizes ( final String desc ) { int n = 1 ; int c = 1 ; while ( true ) { char car = desc . charAt ( c ++ ) ; if ( car == ' ' ) { car = desc . charAt ( c ) ; return n << 2 | ( car == ' ' ? 0 : ( car == ' ' || car == ' ' ? 2 : 1 ) ) ; } else if ( car == ' ' ) { while ( desc . charAt ( c ++ ) != ' ' ) { } n += 1 ; } else if ( car == ' ' ) { while ( ( car = desc . charAt ( c ) ) == ' ' ) { ++ c ; } if ( car == ' ' || car == ' ' ) { n -= 1 ; } } else if ( car == ' ' || car == ' ' ) { n += 2 ; } else { n += 1 ; } } }
Computes the size of the arguments and of the return value of a method .