Class ResolveCustomFunctionNodes

    • Field Detail

      • functionMap

        protected final java.util.Map<java.lang.String,​GssFunction> functionMap
    • Constructor Detail

      • ResolveCustomFunctionNodes

        public ResolveCustomFunctionNodes​(MutatingVisitController visitController,
                                          ErrorManager errorManager,
                                          java.util.Map<java.lang.String,​GssFunction> functionMap)
        Constructs the pass.
        Parameters:
        visitController - The visit controller
        errorManager - The error manager
        functionMap - The map from function names to resolve to GSS functions
      • ResolveCustomFunctionNodes

        public ResolveCustomFunctionNodes​(MutatingVisitController visitController,
                                          ErrorManager errorManager,
                                          java.util.Map<java.lang.String,​GssFunction> functionMap,
                                          boolean allowUnknownFunctions)
        Constructs the pass.
        Parameters:
        visitController - The visit controller
        errorManager - The error manager
        functionMap - The map from function names to resolve to GSS functions
        allowUnknownFunctions - Whether to allow unknown function calls, leaving them as is, instead of reporting an error
      • ResolveCustomFunctionNodes

        public ResolveCustomFunctionNodes​(MutatingVisitController visitController,
                                          ErrorManager errorManager,
                                          java.util.Map<java.lang.String,​GssFunction> functionMap,
                                          boolean allowUnknownFunctions,
                                          java.util.Set<java.lang.String> allowedNonStandardFunctions)
        Constructs the pass.
        Parameters:
        visitController - The visit controller
        errorManager - The error manager
        functionMap - The map from function names to resolve to GSS functions
        allowUnknownFunctions - Whether to allow unknown function calls, leaving them as is, instead of reporting an error
        allowedNonStandardFunctions - functions that should not yield a warning if they appear in a stylesheet
    • Method Detail

      • evaluateFunction

        protected java.util.List<CssValueNode> evaluateFunction​(CssCustomFunctionNode node,
                                                                GssFunction function,
                                                                java.util.List<CssValueNode> arguments,
                                                                ErrorManager errorManager)
                                                         throws GssFunctionException
        Evaluates the given function node.

        Subclasses may sublcass this method to change the evaluation process in some circumstances.

        Parameters:
        node - the function node to evaluate
        function - the GSS function matching this node
        arguments - the arguments of this node
        errorManager - the error manager passed into the GSS function call
        Returns:
        the result of the evaluation as a list of value nodes
        Throws:
        GssFunctionException - if the function call is invalid
        java.lang.RuntimeException - if the function call fails to complete