private static int calculateInformPath(MatcherAction action, String treeName, ParserRuleContext tree) {
        if (tree == null) {
            action.matcher.informMeAbout(action, treeName);
            return 1;
        }

        CalculateInformPathFunction function = CALCULATE_INFORM_PATH.get(tree.getClass());
        if (function != null) {
            return function.calculateInformPath(action, treeName, tree);
        }

        action.matcher.informMeAbout(action, treeName);
        return 1;
    }
Applies this function to the given arguments.
@param action The applicable action.
@param treeName The name of the current tree.
@param tree The actual location in the parseTree
@return the number of informs done
analyzer/src/main/java/nl/basjes/parse/useragent/analyze/MatcherAction.java