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().
    Clément Fournier
    • Method Detail

      • getMetrics

        Set<Metric<?,​?>> getMetrics()
        Returns the set of all metrics supported by the language.
      • 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.
        node - Node to inspect
        A map of metric key to their result, possibly empty, but with no null value