public float get(String name) {
        try {
            Method getter = getClass().getMethod("get" + name.substring(0, 1).toUpperCase() + name.substring(1));
            return ((Number)getter.invoke(this)).floatValue();
        }
        catch (NoSuchMethodException e) {
            throw new IllegalArgumentException("No metric named '" + name + "' is known");
        }
        catch (Exception e) {
            throw new RuntimeException("Error getting metric '" + name + "'",e);
        }
    }
Returns a metric by name

@throws IllegalArgumentException if the metric name (case sensitive) is not present
searchlib/src/main/java/com/yahoo/searchlib/ranking/features/fieldmatch/FieldMatchMetrics.java