Class ApplyHandler

  • All Implemented Interfaces:
    TagHandler

    public class ApplyHandler
    extends AbstractHandler
    Handles the <apply> container element. The first child node specifies a function or operator and the remaining child nodes are its arguments.

    The default action for most operators and functions is to build an ASTOpNode/ASTFunNode from the function. Some functions require special behaviour and these should extend SpecialFunctionHandler implementing the apply method.

    Author:
    Richard Morris
    • Constructor Detail

      • ApplyHandler

        public ApplyHandler​(Jep jep)
        Parameters:
        jep -
    • Method Detail

      • handle

        public java.lang.Object handle​(StackFrame frame,
                                       org.xml.sax.Locator loc)
                                throws org.xml.sax.SAXParseException
        Returns a Node representing the operator or function applied to the arguments. The function is the first child of the node and subsaquent children are its arguments. For operators this will be an ASTOpNode, for Functions its an ASTFunNode For a SpecialFunctionHandler just call its apply method.
        Parameters:
        frame - StackFrame representing the element
        loc - location in input
        Returns:
        typically a Node, other types of objects may also be returned when the tag has a special meaning for its parent node.
        Throws:
        org.xml.sax.SAXParseException