MCPcopy Create free account
hub / github.com/beanshell/beanshell / getArgumentTypes

Method getArgumentTypes

src/bsh/org/objectweb/asm/Type.java:286–311  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

getTypeMethod · 0.95
getParameterTypesMethod · 0.45

Tested by

no test coverage detected