< prev index next >

src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/scan/MethodSig.java

Print this page

118                     continue;
119 
120                 case '[':
121                     p++;
122                     dims++;
123                     continue;
124 
125                 case 'B': // byte
126                 case 'C': // char
127                 case 'D': // double
128                 case 'F': // float
129                 case 'I': // int
130                 case 'J': // long
131                 case 'S': // short
132                 case 'Z': // boolean
133                 case 'V': // void
134                     type = Character.toString(ch);
135                     p++;
136                     break;
137 

138                 case 'L':
139                     int sep = desc.indexOf(';', p);
140                     if (sep == -1 || sep >= end)
141                         throw ex(desc, p);
142                     type = desc.substring(p, ++sep);
143                     p = sep;
144                     break;
145 
146                 default:
147                     throw ex(desc, p);
148             }
149 
150             StringBuilder sb = new StringBuilder();
151             for ( ; dims > 0; dims-- )
152                 sb.append("[");
153             sb.append(type);
154             if (inReturnType) {
155                 returnType = sb.toString();
156             } else {
157                 parameters.add(sb.toString());

118                     continue;
119 
120                 case '[':
121                     p++;
122                     dims++;
123                     continue;
124 
125                 case 'B': // byte
126                 case 'C': // char
127                 case 'D': // double
128                 case 'F': // float
129                 case 'I': // int
130                 case 'J': // long
131                 case 'S': // short
132                 case 'Z': // boolean
133                 case 'V': // void
134                     type = Character.toString(ch);
135                     p++;
136                     break;
137 
138                 case 'Q':
139                 case 'L':
140                     int sep = desc.indexOf(';', p);
141                     if (sep == -1 || sep >= end)
142                         throw ex(desc, p);
143                     type = desc.substring(p, ++sep);
144                     p = sep;
145                     break;
146 
147                 default:
148                     throw ex(desc, p);
149             }
150 
151             StringBuilder sb = new StringBuilder();
152             for ( ; dims > 0; dims-- )
153                 sb.append("[");
154             sb.append(type);
155             if (inReturnType) {
156                 returnType = sb.toString();
157             } else {
158                 parameters.add(sb.toString());
< prev index next >