class ExceptionMeteredInterceptor implements MethodInterceptor {
static MethodInterceptor forMethod(MetricRegistry metricRegistry, Class<?> klass, Method method) {
final ExceptionMetered annotation = method.getAnnotation(ExceptionMetered.class);
if (annotation != null) {
final Meter meter = metricRegistry.meter(determineName(annotation, klass, method));
return new ExceptionMeteredInterceptor(meter, annotation.cause());
}
return null;
}
private static String determineName(ExceptionMetered annotation, Class<?> klass, Method method) {