Class AbstractMetricsFacade<T extends QualifiableNode,​O extends QualifiableNode>

  • Type Parameters:
    T - Type of type declaration nodes of the language
    O - Type of operation declaration nodes of the language

    @Deprecated
    public abstract class AbstractMetricsFacade<T extends QualifiableNode,​O extends QualifiableNode>
    extends Object
    Deprecated.
    See package description
    Base class for a façade that can compute metrics for types, operations and compute aggregate results with a result option.
    Since:
    6.0.0
    Author:
    Clément Fournier
    • Constructor Detail

      • AbstractMetricsFacade

        public AbstractMetricsFacade()
        Deprecated.
    • Method Detail

      • getLanguageSpecificComputer

        @Deprecated
        protected abstract MetricsComputer<T,​O> getLanguageSpecificComputer()
        Deprecated.
        Gets the language specific metrics computer.
        Returns:
        The metrics computer
      • getLanguageSpecificProjectMemoizer

        @Deprecated
        protected abstract ProjectMemoizer<T,​O> getLanguageSpecificProjectMemoizer()
        Deprecated.
        Gets the language-specific project memoizer.
        Returns:
        The project memoizer
      • computeForType

        public double computeForType​(MetricKey<T> key,
                                     T node,
                                     MetricOptions options)
        Deprecated.
        Computes a metric identified by its code on a class AST node, possibly selecting a variant with the MetricOptions parameter.
        Parameters:
        key - The key identifying the metric to be computed
        node - The node on which to compute the metric
        options - The options of the metric
        Returns:
        The value of the metric, or Double.NaN if the value couldn't be computed
      • computeForOperation

        public double computeForOperation​(MetricKey<O> key,
                                          O node,
                                          MetricOptions options)
        Deprecated.
        Computes a metric identified by its key on a operation AST node.
        Parameters:
        key - The key identifying the metric to be computed
        node - The node on which to compute the metric
        options - The options of the metric
        Returns:
        The value of the metric, or Double.NaN if the value couldn't be computed
      • computeWithResultOption

        public double computeWithResultOption​(MetricKey<O> key,
                                              T node,
                                              MetricOptions options,
                                              ResultOption resultOption)
        Deprecated.
        Compute the sum, average, or highest value of the operation metric on all operations of the class node. The type of operation is specified by the ResultOption parameter.
        Parameters:
        key - The key identifying the metric to be computed
        node - The node on which to compute the metric
        resultOption - The result option to use
        options - The options of the metric
        Returns:
        The value of the metric, or Double.NaN if the value couldn't be computed or resultOption is null