353 |
return p.getTypeParameters(); |
return p.getTypeParameters(); |
354 |
} |
} |
355 |
|
|
356 |
|
/** |
357 |
|
* Return the String in the Signature attribute for this method. If there |
358 |
|
* is no Signature attribute, return null. |
359 |
|
*/ |
360 |
private native String getSignature(); |
private native String getSignature(); |
361 |
|
|
362 |
|
/** |
363 |
|
* Returns an array of <code>Type</code> objects that represents |
364 |
|
* the exception types declared by this method, in declaration order. |
365 |
|
* An array of size zero is returned if this method declares no |
366 |
|
* exceptions. |
367 |
|
* |
368 |
|
* @return the exception types declared by this method. |
369 |
|
* @throws GenericSignatureFormatError if the generic signature does |
370 |
|
* not conform to the format specified in the Virtual Machine |
371 |
|
* specification, version 3. |
372 |
|
* @since 1.5 |
373 |
|
*/ |
374 |
|
public Type[] getGenericExceptionTypes() |
375 |
|
{ |
376 |
|
String sig = getSignature(); |
377 |
|
if (sig == null) |
378 |
|
return getExceptionTypes(); |
379 |
|
MethodSignatureParser p = new MethodSignatureParser(this, sig); |
380 |
|
return p.getGenericExceptionTypes(); |
381 |
|
} |
382 |
|
|
383 |
|
/** |
384 |
|
* Returns an array of <code>Type</code> objects that represents |
385 |
|
* the parameter list for this method, in declaration order. |
386 |
|
* An array of size zero is returned if this method takes no |
387 |
|
* parameters. |
388 |
|
* |
389 |
|
* @return a list of the types of the method's parameters |
390 |
|
* @throws GenericSignatureFormatError if the generic signature does |
391 |
|
* not conform to the format specified in the Virtual Machine |
392 |
|
* specification, version 3. |
393 |
|
* @since 1.5 |
394 |
|
*/ |
395 |
|
public Type[] getGenericParameterTypes() |
396 |
|
{ |
397 |
|
String sig = getSignature(); |
398 |
|
if (sig == null) |
399 |
|
return getParameterTypes(); |
400 |
|
MethodSignatureParser p = new MethodSignatureParser(this, sig); |
401 |
|
return p.getGenericParameterTypes(); |
402 |
|
} |
403 |
|
|
404 |
|
/** |
405 |
|
* Returns the return type of this method. |
406 |
|
* |
407 |
|
* @return the return type of this method |
408 |
|
* @throws GenericSignatureFormatError if the generic signature does |
409 |
|
* not conform to the format specified in the Virtual Machine |
410 |
|
* specification, version 3. |
411 |
|
* @since 1.5 |
412 |
|
*/ |
413 |
|
public Type getGenericReturnType() |
414 |
|
{ |
415 |
|
String sig = getSignature(); |
416 |
|
if (sig == null) |
417 |
|
return getReturnType(); |
418 |
|
MethodSignatureParser p = new MethodSignatureParser(this, sig); |
419 |
|
return p.getGenericReturnType(); |
420 |
|
} |
421 |
} |
} |