Returns the descriptor corresponding to the given argument and return types. @param returnType the return type of the method. @param argumentTypes the argument types of the method. @return the descriptor corresponding to the given argument and return types.
(final Type returnType, final Type... argumentTypes)
| 598 | * @return the descriptor corresponding to the given argument and return types. |
| 599 | */ |
| 600 | public static String getMethodDescriptor(final Type returnType, final Type... argumentTypes) { |
| 601 | StringBuilder stringBuilder = new StringBuilder(); |
| 602 | stringBuilder.append('('); |
| 603 | for (int i = 0; i < argumentTypes.length; ++i) { |
| 604 | argumentTypes[i].appendDescriptor(stringBuilder); |
| 605 | } |
| 606 | stringBuilder.append(')'); |
| 607 | returnType.appendDescriptor(stringBuilder); |
| 608 | return stringBuilder.toString(); |
| 609 | } |
| 610 | |
| 611 | /** |
| 612 | * Appends the descriptor corresponding to this type to the given string buffer. |
no test coverage detected