Returns the Java types corresponding to the argument types of the given method descriptor. @param methodDescriptor a method descriptor. @return the Java types corresponding to the argument types of the given method descriptor.
(final String methodDescriptor)
| 284 | */ |
| 285 | |
| 286 | public static Type[] getArgumentTypes (final String methodDescriptor) { |
| 287 | char[] buf = methodDescriptor.toCharArray(); |
| 288 | int off = 1; |
| 289 | int size = 0; |
| 290 | while (true) { |
| 291 | char car = buf[off++]; |
| 292 | if (car == ')') { |
| 293 | break; |
| 294 | } else if (car == 'L') { |
| 295 | while (buf[off++] != ';') { |
| 296 | } |
| 297 | ++size; |
| 298 | } else if (car != '[') { |
| 299 | ++size; |
| 300 | } |
| 301 | } |
| 302 | Type[] args = new Type[size]; |
| 303 | off = 1; |
| 304 | size = 0; |
| 305 | while (buf[off] != ')') { |
| 306 | args[size] = getType(buf, off); |
| 307 | off += args[size].len; |
| 308 | size += 1; |
| 309 | } |
| 310 | return args; |
| 311 | } |
| 312 | |
| 313 | /** |
| 314 | * Returns the Java types corresponding to the argument types of the given |
nothing calls this directly
no test coverage detected