result = (result & 0x7f) | ((cur & 0x7f) << 7); if (cur <= 0x7f) {
result = (result << 18) >> 18; } else {
cur = *(ptr++);
result |= (cur & 0x7f) << 14; if (cur <= 0x7f) {
result = (result << 11) >> 11; } else {
cur = *(ptr++);
result |= (cur & 0x7f) << 21; if (cur <= 0x7f) {
result = (result << 4) >> 4; } else { /*
* Note: We don't check to see if cur is out of * range here, meaning we tolerate garbage in the * high four-order bits. */
cur = *(ptr++);
result |= cur << 28; } } } }
*pStream = ptr; return result; }
附录2 字段和方法描述符 (1) Field Descriptors
The field descriptors for eight primitive types are as follows:
引用类型使用L开头,如下:
(2) Method Descriptors
方法描述符形式为括号内所有参数类型的描述符,后加上返回类型的字段描述符。V表示void方法返回类型,构造函数的返回类型也为V,名字为
(3) ShortyDescriptor A ShortyDescriptor is the short form representation of a method prototype, including return and parameter types, except that there is no distinction between various reference(class or array)types. Instead, all reference types are represented by a single 'L' character.
ShortyDescriptor Java Language Type String f(); L long f(int i, Class c); JIL String(byte[] bytes); VL