code: private String getParameterName(AnnotatedParameter<?> parameter) {
          try {
              Method method = Method.class.getMethod("getParameters");
              Object[] parameters = (Object[]) method.invoke(parameter.getDeclaringCallable().getJavaMember());
              Object param = parameters[parameter.getPosition()];
              Class<?> Parameter = Class.forName("java.lang.reflect.Parameter");
              if ((Boolean) Parameter.getMethod("isNamePresent").invoke(param))
                  return (String) Parameter.getMethod("getName").invoke(param);
              else
                  throw new UnsupportedOperationException("Unable to retrieve name for parameter [" + parameter
                                                          + "], activate the -parameters compiler argument or annotate the injected parameter with the @Metric annotation");
          } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | ClassNotFoundException cause) {
              throw new UnsupportedOperationException("Unable to retrieve name for parameter [" + parameter
                                                      + "], @Metric annotation on injected parameter is required before Java 8");
          }
      }
docs: TODO: move into a separate metric name strategy