Interface MetricOption


  • public interface MetricOption
    Option to pass to a metric. Options modify the behaviour of a metric. You must bundle them into a MetricOptions to pass them all to a metric.

    Options must implement hashCode and equals.

    Combining options together may be done with a decorator pattern. If you use an AST visitor to compute your metric, look at the Cyclo metric in the Java framework for an example (the decorator pattern is not applicable as is on a visitor, a modified version of it has been implemented for the Java framework).

    Since:
    6.0.0
    Author:
    Clément Fournier
    • Method Detail

      • name

        String name()
        Returns the name of the option constant.
        Returns:
        The name of the option constant.
      • valueName

        String valueName()
        Returns the name of the option as it should be used in properties.
        Returns:
        The name of the option.