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 through
LanguageVersionHandler.getLanguageMetricsProvider().- Author:
- Clément Fournier
- Since:
- 6.11.0
-
Method Summary
Modifier and TypeMethodDescriptioncomputeAllMetricsFor(Node node) Computes all metrics available on the given node.Returns the set of all metrics supported by the language.default @Nullable Metric<?,?> getMetricWithName(String nameIgnoringCase) Fetch a metric using its name.
-
Method Details
-
getMetrics
Returns the set of all metrics supported by the language. -
getMetricWithName
Fetch a metric using its name. -
computeAllMetricsFor
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
-