List of usage examples for weka.gui.beans PluginManager getPluginNamesOfType
public static Set<String> getPluginNamesOfType(String interfaceName)
From source file:AbstractEvaluationMetric.java
License:Open Source License
/** * Gets a list of freshly instantiated concrete implementations of available * plugin metrics or null if there are no plugin metrics available * /*from ww w .ja va 2s.c o m*/ * @return a list of plugin metrics or null if there are no plugin metrics */ public static ArrayList<AbstractEvaluationMetric> getPluginMetrics() { ArrayList<AbstractEvaluationMetric> pluginMetricsList = null; Set<String> pluginMetrics = PluginManager.getPluginNamesOfType(AbstractEvaluationMetric.class.getName()); if (pluginMetrics != null) { pluginMetricsList = new ArrayList<AbstractEvaluationMetric>(); for (String metric : pluginMetrics) { try { Object impl = PluginManager.getPluginInstance(AbstractEvaluationMetric.class.getName(), metric); if (impl instanceof AbstractEvaluationMetric) { pluginMetricsList.add((AbstractEvaluationMetric) impl); } } catch (Exception ex) { ex.printStackTrace(); } } } return pluginMetricsList; }