Class AbstractHandler
java.lang.Object
com.singularsys.extensions.mathml.parser.AbstractHandler
- All Implemented Interfaces:
TagHandler
- Direct Known Subclasses:
AnnotationHandler,ApplyHandler,ConstantHandler,DeclareHandler,FnHandler,IdentifierHandler,MathTagHandler,MatrixHandler,NumericConstantHandler,SemanticHandler
Base class which provides access to Jep components
- Author:
- Richard Morris
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FunctionTableprotected final Jepprotected final NodeFactoryprotected final NumberFactoryprotected final OperatorTableIprotected final VariableTable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Node[]convertChildrenToNodes(StackFrame frame, int start, Locator loc) Converts the children of a StackFrame to an array of Nodes.protected NodeconvertToNode(StackFrame frame, Object arg, Locator loc) Casts the argument to a Node.getFt()getJep()getNf()getNumf()getOt()protected Node[]jepNodesAsArray(StackFrame frame, Locator loc) Convert those children which are nodes to a list, other nodes are ignored.protected Node[]jepNodesToFlatArray(StackFrame frame, Locator loc) Convert those children which are nodes or arrays of nodes to a list.jepNodesToFlatList(StackFrame frame) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.singularsys.extensions.mathml.parser.TagHandler
handle
-
Field Details
-
jep
-
nf
-
ot
-
numf
-
ft
-
vt
-
-
Constructor Details
-
AbstractHandler
-
-
Method Details
-
convertToNode
Casts the argument to a Node.- Parameters:
frame-arg- the argumentloc-- Returns:
- the argument cast as a Node.
- Throws:
SAXParseException- if the argument is not a Node
-
convertChildrenToNodes
protected Node[] convertChildrenToNodes(StackFrame frame, int start, Locator loc) throws SAXParseException Converts the children of a StackFrame to an array of Nodes.- Parameters:
frame- the StackFramestart- the first child to convertloc-- Returns:
- an array of size (frame.getNumChildren - start)
- Throws:
SAXParseException- if any of the arguments are not nodes
-
jepNodesAsArray
Convert those children which are nodes to a list, other nodes are ignored.- Parameters:
frame-loc-- Returns:
- an array of nodes
-
jepNodesToFlatArray
Convert those children which are nodes or arrays of nodes to a list.- Parameters:
frame-loc-- Returns:
- an array of nodes
-
jepNodesToFlatList
-
getJep
-
getNf
-
getOt
-
getNumf
-
getFt
-