Class ApplyHandler
- java.lang.Object
-
- com.singularsys.extensions.mathml.parser.AbstractHandler
-
- com.singularsys.extensions.mathml.parser.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 Summary
Constructors Constructor Description ApplyHandler(Jep jep)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
handle(StackFrame frame, org.xml.sax.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 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 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:
org.xml.sax.SAXParseException
-
-