Package net.sourceforge.pmd.lang.metrics
Interface LanguageMetricsProvider
-
public interface LanguageMetricsProvider
Language-specific provider for metrics. Knows about all the metrics defined for a language. Can be used e.g. to build GUI applications like the designer, in a language independent way. Accessible throughLanguageVersionHandler.getLanguageMetricsProvider()
.- Author:
- Clément Fournier
- Since:
- 6.11.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Map<Metric<?,?>,Number>
computeAllMetricsFor(Node node)
Computes all metrics available on the given node.Set<Metric<?,?>>
getMetrics()
Returns the set of all metrics supported by the language.default @Nullable Metric<?,?>
getMetricWithName(String nameIgnoringCase)
Fetch a metric using its name.
-
-
-
Method Detail
-
getMetricWithName
default @Nullable Metric<?,?> getMetricWithName(String nameIgnoringCase)
Fetch a metric using its name.
-
computeAllMetricsFor
default Map<Metric<?,?>,Number> computeAllMetricsFor(Node node)
Computes all metrics available on the given node. The returned results may contain Double.NaN as a value.- Parameters:
node
- Node to inspect- Returns:
- A map of metric key to their result, possibly empty, but with no null value
-
-