@VisibleForTesting
    static String getPathFromMethod(Method method) {
        final String path = pathCache.get(method);
        if (path != null) {
            return path;
        }

        return pathCache.computeIfAbsent(method, key -> {
            for (Annotation annotation : method.getDeclaredAnnotations()) {
                if (!RETROFIT_ANNOTATIONS.contains(annotation.annotationType())) {
                    continue;
                }
                if (annotation.annotationType().equals(HTTP.class)) {
                    final HTTP http = (HTTP) annotation;
                    return http.path();
                } else {
                    final Method valueMethod;
                    try {
                        valueMethod = annotation.annotationType().getMethod("value");
                        return (String) valueMethod.invoke(annotation);
                    } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
                        // Should never happen on valid Retrofit client.
                        throw new IllegalStateException("Unexpected retrofit annotation: " +
                                                        annotation.annotationType(), e);
                    }
                }
            }
            // Should never reach here.
            return NONE;
        });
    }
Returns a newly created {@link RetrofitMeterIdPrefixFunction} with the specified {@code name}.
retrofit2/src/main/java/com/linecorp/armeria/client/retrofit2/RetrofitMeterIdPrefixFunction.java