Returns the descriptor corresponding to the given constructor. @param constructor a Constructor object. @return the descriptor of the given constructor.
(final Constructor<?> constructor)
| 660 | * @return the descriptor of the given constructor. |
| 661 | */ |
| 662 | public static String getConstructorDescriptor(final Constructor<?> constructor) { |
| 663 | StringBuilder stringBuilder = new StringBuilder(); |
| 664 | stringBuilder.append('('); |
| 665 | Class<?>[] parameters = constructor.getParameterTypes(); |
| 666 | for (int i = 0; i < parameters.length; ++i) { |
| 667 | appendDescriptor(stringBuilder, parameters[i]); |
| 668 | } |
| 669 | return stringBuilder.append(")V").toString(); |
| 670 | } |
| 671 | |
| 672 | /** |
| 673 | * Returns the descriptor corresponding to the given method. |