public abstract class SyntaxTreeNode extends Object implements Constants
InstructionConstants.Clinit| Modifier and Type | Field and Description |
|---|---|
protected AttributesImpl |
_attributes |
protected SyntaxTreeNode |
_parent |
protected jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.QName |
_qname |
protected static SyntaxTreeNode |
Dummy |
protected static int |
IndentIncrement |
ABSOLUTE_ITERATOR, ACC_FINAL, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_SUPER, ADD_ATTRIBUTE, ADD_ATTRIBUTE_SIG, ADD_ITERATOR, ADD_ITERATOR_SIG, ADD_PARAMETER, ADD_PARAMETER_SIG, APPLY_TEMPLATES, ATTR_SET_SIG, ATTRIBUTE_LIST_FIELD, ATTRIBUTE_LIST_IMPL_CLASS, ATTRIBUTE_LIST_IMPL_SIG, ATTRIBUTES_SIG, BASIS_LIBRARY_CLASS, BOOLEAN_CLASS, BOOLEAN_VALUE, BOOLEAN_VALUE_SIG, CACHED_NODE_LIST_ITERATOR_CLASS, CHARACTERS, CHARACTERS_SIG, CHARACTERSW, CHARACTERSW_SIG, CLEAR_ATTRIBUTES, CLEAR_ATTRIBUTES_SIG, COLLATOR_CLASS, COLLATOR_SIG, COMPILER_PACKAGE, CURRENT_NODE_LIST_FILTER, CURRENT_NODE_LIST_FILTER_SIG, CURRENT_NODE_LIST_ITERATOR, CURRENT_NODE_LIST_ITERATOR_SIG, DEFAULT_NODE_COUNTER, DEFAULT_NODE_COUNTER_SIG, DOCUMENT_PNAME, DOM_ADAPTER_CLASS, DOM_ADAPTER_SIG, DOM_FIELD, DOM_IMPL, DOM_IMPL_CLASS, DOM_IMPL_SIG, DOM_INTF, DOM_INTF_SIG, DOM_PNAME, DOUBLE_CLASS, DOUBLE_SIG, DOUBLE_VALUE, DOUBLE_VALUE_SIG, DUP_FILTERED_ITERATOR, EMPTYATTR_FIELD, EMPTYSTRING, ERROR, FALLBACK_CLASS, FATAL, FILTER_INTERFACE, FILTER_INTERFACE_SIG, FILTER_ITERATOR, FILTER_STEP_ITERATOR, FORMAT_SYMBOLS_FIELD, GET_ATTRIBUTE_VALUE, GET_ATTRIBUTE_VALUE_SIG, GET_CHILDREN, GET_CHILDREN_SIG, GET_ELEMENT_VALUE, GET_ELEMENT_VALUE_SIG, GET_ITERATOR_SIG, GET_NODE_NAME, GET_NODE_NAME_SIG, GET_NODE_TYPE, GET_NODE_TYPE_SIG, GET_NODE_VALUE, GET_NODE_VALUE_ITERATOR, GET_NODE_VALUE_ITERATOR_SIG, GET_NODE_VALUE_SIG, GET_PARAMETER, GET_PARAMETER_SIG, GET_PARENT, GET_PARENT_SIG, GET_TYPED_CHILDREN, GET_TYPED_CHILDREN_SIG, GET_UNPARSED_ENTITY_URI, GET_UNPARSED_ENTITY_URI_SIG, HAS_ATTRIBUTE, HAS_ATTRIBUTE_SIG, HASIDCALL_INDEX, HASIDCALL_INDEX_SIG, INT_VALUE, INT_VALUE_SIG, INTEGER_CLASS, INTEGER_SIG, INTERNAL, INVOKE_METHOD, ITERATOR_FIELD_SIG, ITERATOR_PNAME, KEY_INDEX_CLASS, KEY_INDEX_ITERATOR_SIG, KEY_INDEX_SIG, LAST_INDEX, LOAD_DOCUMENT_CLASS, LOCALE_CLASS, LOCALE_SIG, MAKE_NODE, MAKE_NODE_LIST, MAKE_NODE_LIST_SIG, MAKE_NODE_LIST_SIG2, MAKE_NODE_SIG, MAKE_NODE_SIG2, MATCHING_ITERATOR, MATH_CLASS, MULTI_DOM_CLASS, MULTI_DOM_SIG, NAMES_INDEX, NAMES_INDEX_SIG, NAMESPACE_FEATURE, NAMESPACE_INDEX, NAMESPACE_INDEX_SIG, NEXT, NEXT_SIG, NEXTID, NODE, NODE_COUNTER, NODE_COUNTER_SIG, NODE_FIELD, NODE_FIELD_SIG, NODE_ITERATOR, NODE_ITERATOR_BASE, NODE_ITERATOR_SIG, NODE_PNAME, NODE_SIG, NODE_SORT_FACTORY, NODE_SORT_FACTORY_SIG, NODE_SORT_RECORD, NODE_SORT_RECORD_SIG, NTH_ITERATOR_CLASS, OBJECT_CLASS, OBJECT_SIG, ORDER_ITERATOR, ORDER_ITERATOR_SIG, OUTPUT_BASE, OUTPUT_HANDLER, OUTPUT_HANDLER_SIG, POP_PARAM_FRAME, POP_PARAM_FRAME_SIG, POSITION_INDEX, PUSH_PARAM_FRAME, PUSH_PARAM_FRAME_SIG, REDIRECT_URI, RESET, RESET_SIG, RTF_INITIAL_SIZE, RUNTIME_NODE_CLASS, RUNTIME_PACKAGE, SAX_IMPL, SAX_IMPL_CLASS, SAX_IMPL_SIG, SET_START_NODE, SET_START_NODE_SIG, SINGLETON_ITERATOR, SORT_ITERATOR, SORT_ITERATOR_SIG, STATIC_CHAR_DATA_FIELD, STATIC_CHAR_DATA_FIELD_SIG, STATIC_NAMES_ARRAY_FIELD, STATIC_NAMESPACE_ARRAY_FIELD, STATIC_TYPES_ARRAY_FIELD, STATIC_URIS_ARRAY_FIELD, STEP_ITERATOR_CLASS, STREAM_XML_OUTPUT, STRING, STRING_BUFFER_CLASS, STRING_BUFFER_SIG, STRING_CLASS, STRING_SIG, STRING_TO_INT, STRING_TO_INT_SIG, STRING_TO_REAL, STRING_TO_REAL_SIG, STRING_VALUE_HANDLER, STRING_VALUE_HANDLER_SIG, STRING_WRITER, STRIP_SPACE, STRIP_SPACE_INTF, STRIP_SPACE_PARAMS, STRIP_SPACE_SIG, TRANSLET_CLASS, TRANSLET_FIELD, TRANSLET_FIELD_SIG, TRANSLET_INTF, TRANSLET_INTF_SIG, TRANSLET_OUTPUT_BASE, TRANSLET_OUTPUT_INTERFACE, TRANSLET_OUTPUT_PNAME, TRANSLET_OUTPUT_SIG, TRANSLET_PNAME, TRANSLET_SIG, TRANSLET_URI, TRANSLET_VERSION_INDEX, TRANSLET_VERSION_INDEX_SIG, TYPES_INDEX, TYPES_INDEX_SIG, UNION_ITERATOR_CLASS, UNION_ITERATOR_SIG, UNSUPPORTED, URIS_INDEX, URIS_INDEX_SIG, WARNING, WRITER_SIG, XHTML_URI, XMLNS_PREFIX, XMLNS_STRING, XMLNS_URI, XSLT_PACKAGE, XSLT_URIAALOAD, AASTORE, ACONST_NULL, ALOAD_0, ALOAD_1, ALOAD_2, ARETURN, ARRAYLENGTH, ASTORE_0, ASTORE_1, ASTORE_2, ATHROW, BALOAD, BASTORE, bla, CALOAD, CASTORE, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DMUL, DNEG, DREM, DRETURN, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FMUL, FNEG, FREM, FRETURN, FSUB, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, ILOAD_0, ILOAD_1, ILOAD_2, IMUL, INEG, INSTRUCTIONS, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE_0, ISTORE_1, ISTORE_2, ISUB, IUSHR, IXOR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDIV, LMUL, LNEG, LOR, LREM, LRETURN, LSHL, LSHR, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, NOP, POP, POP2, RETURN, SALOAD, SASTORE, SWAP, THIS| Constructor and Description |
|---|
SyntaxTreeNode()
Creates a new SyntaxTreeNode with a 'null' QName and no source file
line number reference.
|
SyntaxTreeNode(int line)
Creates a new SyntaxTreeNode with a 'null' QName.
|
SyntaxTreeNode(String uri,
String prefix,
String local)
Creates a new SyntaxTreeNode with no source file line number reference.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAttribute(String qname,
String value) |
protected void |
addElement(SyntaxTreeNode element)
Adds a child node to this syntax tree node.
|
protected void |
addPrefixMapping(String prefix,
String uri)
Adds a single prefix mapping to this syntax tree node.
|
protected void |
compileResultTree(ClassGenerator classGen,
MethodGenerator methodGen)
Utility method used by parameters and variables to store result trees
|
protected boolean |
contextDependent()
Returns true if this expression/instruction depends on the context.
|
protected boolean |
dependentContents()
Return true if any of the expressions/instructions in the contents of
this node is context dependent.
|
void |
display(int indent)
Displays the contents of this syntax tree node (to stdout).
|
protected void |
displayContents(int indent)
Displays the contents of this syntax tree node (to stdout).
|
protected Object |
elementAt(int pos)
Returns a child node at a given position.
|
protected int |
elementCount()
Returns the number of children this node has.
|
protected Enumeration |
elements()
Returns an Enumeration of all child nodes of this node.
|
protected String |
getAttribute(String qname)
Returns a value for an attribute from the source element.
|
protected String |
getAttribute(String prefix,
String localName) |
protected Attributes |
getAttributes()
Returns a list of all attributes declared for the element represented by
this syntax tree node.
|
protected Vector |
getContents()
Returns a Vector containing all the child nodes of this node.
|
protected int |
getImportPrecedence()
Get the import precedence of this element.
|
int |
getLineNumber()
Get the source file line number for this element.
|
protected SyntaxTreeNode |
getParent()
Returns this syntax tree node's parent node.
|
Parser |
getParser()
Returns this node's XSLT parser.
|
protected Hashtable |
getPrefixMapping()
Returns a Hashtable containing the prefix mappings that were declared
for this element.
|
protected jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.QName |
getQName()
Set the QName for the SyntaxTreeNode
|
Stylesheet |
getStylesheet()
Get the Stylesheet node that represents the
|
protected jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.SymbolTable |
getSymbolTable()
Returns the XSLT parser's symbol table.
|
protected Template |
getTemplate()
Get the Template node that represents the
|
protected XSLTC |
getXSLTC()
Returns a reference to the XSLTC (XSLT compiler) in use.
|
protected boolean |
hasAttribute(String qname) |
protected boolean |
hasContents()
Tells you if this node has any child nodes.
|
protected void |
indent(int indent)
Set the indentation level for debug output.
|
protected boolean |
isDummy()
Returns 'true' if this syntax tree node is the Sentinal node.
|
protected SyntaxTreeNode |
lastChild()
Returns this element's last child
|
protected String |
lookupNamespace(String prefix)
Returns any namespace URI that is in scope for a given prefix.
|
protected String |
lookupPrefix(String uri)
Returns any namespace prefix that is mapped to a prefix in the current
scope.
|
protected void |
parseChildren(Parser parser)
Parse all children of this syntax tree node.
|
void |
parseContents(Parser parser)
Parse the contents of this syntax tree nodes (child nodes, XPath
expressions, patterns and functions).
|
protected void |
removeElement(SyntaxTreeNode element)
Removed a child node of this syntax tree node.
|
protected void |
reportError(SyntaxTreeNode element,
Parser parser,
String errorCode,
String message)
Report an error to the parser.
|
protected void |
reportWarning(SyntaxTreeNode element,
Parser parser,
String errorCode,
String message)
Report a recoverable error to the parser.
|
protected void |
setAttributes(AttributesImpl attributes)
Set the attributes for this SyntaxTreeNode.
|
protected void |
setFirstElement(SyntaxTreeNode element)
Inserts the first child node of this syntax tree node.
|
protected void |
setLineNumber(int line)
Set the source file line number for this element
|
protected void |
setParent(SyntaxTreeNode parent)
Set this syntax tree node's parent node, if unset.
|
protected void |
setParser(Parser parser)
Set this node's parser.
|
protected void |
setPrefixMapping(Hashtable mapping)
Sets the prefix mapping for the namespaces that were declared in this
element.
|
protected void |
setQName(jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.QName qname)
Set the QName for the syntax tree node.
|
protected void |
setQName(String uri,
String prefix,
String localname)
Set the QName for the SyntaxTreeNode
|
abstract void |
translate(ClassGenerator classGen,
MethodGenerator methodGen)
Translate this abstract syntax tree node into JVM bytecodes.
|
protected void |
translateContents(ClassGenerator classGen,
MethodGenerator methodGen)
Call translate() on all child syntax tree nodes.
|
abstract Type |
typeCheck(jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.SymbolTable stable)
Type check the children of this node.
|
protected Type |
typeCheckContents(jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.SymbolTable stable)
Call typeCheck() on all child syntax tree nodes.
|
protected jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.QName |
updateScope(Parser parser,
SyntaxTreeNode node)
Add a node to the current scope and return name of a variable or
parameter if the node represents a variable or a parameter.
|
protected SyntaxTreeNode _parent
protected jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.QName _qname
protected AttributesImpl _attributes
protected static final SyntaxTreeNode Dummy
protected static final int IndentIncrement
public SyntaxTreeNode()
public SyntaxTreeNode(int line)
line - Source file line number referenceprotected final void setLineNumber(int line)
line - The source file line number.public final int getLineNumber()
protected void setQName(jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.QName qname)
qname - The QName for the syntax tree nodeprotected void setQName(String uri, String prefix, String localname)
uri - The element's namespace URIprefix - The element's namespace prefixlocal - The element's local nameprotected jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.QName getQName()
qname - The QName for the syntax tree nodeprotected void setAttributes(AttributesImpl attributes)
attributes - Attributes for the element. Must be passed in as an
implementation of org.xml.sax.Attributes.protected String getAttribute(String qname)
qname - The QName of the attribute to return.protected boolean hasAttribute(String qname)
protected Attributes getAttributes()
protected void setPrefixMapping(Hashtable mapping)
mapping - The Hashtable containing the mappings.protected Hashtable getPrefixMapping()
protected void addPrefixMapping(String prefix, String uri)
prefix - Namespace prefix.uri - Namespace URI.protected String lookupNamespace(String prefix)
prefix - Namespace prefix.protected String lookupPrefix(String uri)
uri - Namespace URI.protected void setParser(Parser parser)
parser - The XSLT parser.public final Parser getParser()
protected void setParent(SyntaxTreeNode parent)
node._parent = newparent.parent - The parent node.protected final SyntaxTreeNode getParent()
protected final boolean isDummy()
protected int getImportPrecedence()
public Stylesheet getStylesheet()
protected Template getTemplate()
protected final XSLTC getXSLTC()
protected final jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.SymbolTable getSymbolTable()
public void parseContents(Parser parser)
parser - reference to the XSLT parserprotected final void parseChildren(Parser parser)
parser - reference to the XSLT parserprotected jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.QName updateScope(Parser parser, SyntaxTreeNode node)
public abstract Type typeCheck(jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.SymbolTable stable) throws TypeCheckError
stable - The compiler/parser's symbol tableTypeCheckErrorprotected Type typeCheckContents(jdk7u.jaxp.org.apache.xalan.external.xsltc.compiler.SymbolTable stable) throws TypeCheckError
stable - The compiler/parser's symbol tableTypeCheckErrorpublic abstract void translate(ClassGenerator classGen, MethodGenerator methodGen)
classGen - BCEL Java class generatormethodGen - BCEL Java method generatorprotected void translateContents(ClassGenerator classGen, MethodGenerator methodGen)
classGen - BCEL Java class generatormethodGen - BCEL Java method generatorprotected void compileResultTree(ClassGenerator classGen, MethodGenerator methodGen)
classGen - BCEL Java class generatormethodGen - BCEL Java method generatorprotected boolean contextDependent()
protected boolean dependentContents()
protected final void addElement(SyntaxTreeNode element)
element - is the new child node.protected final void setFirstElement(SyntaxTreeNode element)
element - is the new child node.protected final void removeElement(SyntaxTreeNode element)
element - is the child node to remove.protected final Vector getContents()
protected final boolean hasContents()
protected final int elementCount()
protected final Enumeration elements()
protected final Object elementAt(int pos)
pos - The child node's position.protected final SyntaxTreeNode lastChild()
public void display(int indent)
indent - Indentation level for syntax tree levels.protected void displayContents(int indent)
indent - Indentation level for syntax tree levels.protected final void indent(int indent)
indent - Indentation level for syntax tree levels.protected void reportError(SyntaxTreeNode element, Parser parser, String errorCode, String message)
element - The element in which the error occured (normally 'this'
but it could also be an expression/pattern/etc.)parser - The XSLT parser to report the error to.error - The error code (from util/ErrorMsg).message - Any additional error message.protected void reportWarning(SyntaxTreeNode element, Parser parser, String errorCode, String message)
element - The element in which the error occured (normally 'this'
but it could also be an expression/pattern/etc.)parser - The XSLT parser to report the error to.error - The error code (from util/ErrorMsg).message - Any additional error message.Copyright © 2018–2021 mhoffrogge. All rights reserved.