Configuration keys are formatted as unresolved see tags . This method exposes that format, in case you need to create the same value as MethodMetadata#configKey() for correlation purposes.
(Class targetType, Method method)
| 67 | * @see MethodMetadata#configKey() |
| 68 | */ |
| 69 | public static String configKey(Class targetType, Method method) { |
| 70 | StringBuilder builder = new StringBuilder(); |
| 71 | builder.append(targetType.getSimpleName()); |
| 72 | builder.append('#').append(method.getName()).append('('); |
| 73 | for (Type param : method.getGenericParameterTypes()) { |
| 74 | param = Types.resolve(targetType, targetType, param); |
| 75 | builder.append(Types.getRawType(param).getSimpleName()).append(','); |
| 76 | } |
| 77 | if (method.getParameterTypes().length > 0) { |
| 78 | builder.deleteCharAt(builder.length() - 1); |
| 79 | } |
| 80 | return builder.append(')').toString(); |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * @deprecated use {@link #configKey(Class, Method)} instead. |