Class ApplyHandler
java.lang.Object
com.singularsys.extensions.mathml.parser.AbstractHandler
com.singularsys.extensions.mathml.parser.ApplyHandler
- All Implemented Interfaces:
TagHandler
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
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle(StackFrame frame, Locator loc) Returns a Node representing the operator or function applied to the arguments.Methods inherited from class com.singularsys.extensions.mathml.parser.AbstractHandler
convertChildrenToNodes, convertToNode, getFt, getJep, getNf, getNumf, getOt, jepNodesAsArray, jepNodesToFlatArray, jepNodesToFlatList
-
Constructor Details
-
ApplyHandler
- Parameters:
jep-
-
-
Method Details
-
handle
Returns a Node representing the operator or function applied to the arguments. The function is the first child of the node and subsequent children are its arguments. For operators this will be an ASTOpNode, for Functions an ASTFunNode For a SpecialFunctionHandler just call its apply method.- Parameters:
frame- StackFrame representing the elementloc- 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:
SAXParseException
-