@Test(expected = IllegalArgumentException.class) public void throwsExceptionForNonExistentMetric() throws Exception { manager.instantiateMetric("non.existent.DummyMetric"); }
@Override public Metric instantiateMetric(String metricName) throws IllegalArgumentException, InstantiationException { final Class<? extends Metric> klazz = findMetricClass(metricName); return instantiateMetricClass(klazz); }
SimpleMetricClassManager implements MetricClassManager { @Override public Metric instantiateMetric(String metricName) throws IllegalArgumentException, InstantiationException { final Class<? extends Metric> klazz = findMetricClass(metricName); return instantiateMetricClass(klazz); } }
SimpleMetricClassManager implements MetricClassManager { @Override public Metric instantiateMetric(String metricName) throws IllegalArgumentException, InstantiationException { final Class<? extends Metric> klazz = findMetricClass(metricName); return instantiateMetricClass(klazz); } SimpleMetricClassManager(Collection<String> metricClasses); }
SimpleMetricClassManager implements MetricClassManager { @Override public Metric instantiateMetric(String metricName) throws IllegalArgumentException, InstantiationException { final Class<? extends Metric> klazz = findMetricClass(metricName); return instantiateMetricClass(klazz); } SimpleMetricClassManager(Collection<String> metricClasses); @Override Collection<String> getMetrics(); @Override Metric instantiateMetric(String metricName); }
SimpleMetricClassManager implements MetricClassManager { @Override public Metric instantiateMetric(String metricName) throws IllegalArgumentException, InstantiationException { final Class<? extends Metric> klazz = findMetricClass(metricName); return instantiateMetricClass(klazz); } SimpleMetricClassManager(Collection<String> metricClasses); @Override Collection<String> getMetrics(); @Override Metric instantiateMetric(String metricName);  }