this.metrics = metrics;
}
@Override
protected void withField(Object bean, String beanName, Class<?> targetClass, Field field) {
final Metric annotation = field.getAnnotation(Metric.class);
final String metricName = Util.forMetricField(targetClass, field, annotation);
final Class<?> type = field.getType();
if (!com.codahale.metrics.Metric.class.isAssignableFrom(type)) {
throw new IllegalArgumentException("Field " + targetClass.getCanonicalName() + "." + field.getName() + " must be a subtype of "