Class MetricFunction

  • All Implemented Interfaces:
    org.jaxen.Function

    @InternalApi
    @Deprecated
    public class MetricFunction
    extends java.lang.Object
    implements org.jaxen.Function
    Deprecated.
    Implements the metric() XPath function. Takes the string name of a metric and the context node and returns the result if the metric can be computed, otherwise returns Double.NaN.
    Since:
    6.0.0
    Author:
    Clément Fournier
    • Constructor Detail

      • MetricFunction

        public MetricFunction()
        Deprecated.
    • Method Detail

      • call

        public java.lang.Object call​(org.jaxen.Context context,
                                     java.util.List args)
                              throws org.jaxen.FunctionCallException
        Deprecated.
        Specified by:
        call in interface org.jaxen.Function
        Throws:
        org.jaxen.FunctionCallException
      • badOperationMetricKeyMessage

        public static java.lang.String badOperationMetricKeyMessage()
        Deprecated.
      • badClassMetricKeyMessage

        public static java.lang.String badClassMetricKeyMessage()
        Deprecated.
      • genericBadNodeMessage

        public static java.lang.String genericBadNodeMessage()
        Deprecated.
      • badMetricKeyArgMessage

        public static java.lang.String badMetricKeyArgMessage()
        Deprecated.
      • getMetric

        public static double getMetric​(net.sourceforge.pmd.lang.ast.Node n,
                                       java.lang.String metricKeyName)
        Deprecated.
      • registerSelfInSimpleContext

        public static void registerSelfInSimpleContext()
        Deprecated.