Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary#runTimeError()
The following examples show how to use
com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary#runTimeError() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultiValuedNodeHeapIterator.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public DTMAxisIterator cloneIterator() { _isRestartable = false; final HeapNode[] heapCopy = new HeapNode[_heap.length]; try { MultiValuedNodeHeapIterator clone = (MultiValuedNodeHeapIterator)super.clone(); for (int i = 0; i < _free; i++) { heapCopy[i] = _heap[i].cloneHeapNode(); } clone.setRestartable(false); clone._heap = heapCopy; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 2
Source File: SAXImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public DTMAxisIterator cloneIterator() { try { NodeValueIterator clone = (NodeValueIterator)super.clone(); clone._isRestartable = false; clone._source = _source.cloneIterator(); clone._value = _value; clone._op = _op; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 3
Source File: StepIterator.java From JDKSourceCode1.8 with MIT License | 6 votes |
public DTMAxisIterator cloneIterator() { _isRestartable = false; try { final StepIterator clone = (StepIterator) super.clone(); clone._source = _source.cloneIterator(); clone._iterator = _iterator.cloneIterator(); clone._iterator.setRestartable(true); // must be restartable clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 4
Source File: SAXImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Lookup a namespace URI from a prefix starting at node. This method * is used in the execution of xsl:element when the prefix is not known * at compile time. */ public String lookupNamespace(int node, String prefix) throws TransletException { int anode, nsnode; final AncestorIterator ancestors = new AncestorIterator(); if (isElement(node)) { ancestors.includeSelf(); } ancestors.setStartNode(node); while ((anode = ancestors.next()) != DTM.NULL) { final NamespaceIterator namespaces = new NamespaceIterator(); namespaces.setStartNode(anode); while ((nsnode = namespaces.next()) != DTM.NULL) { if (getLocalName(nsnode).equals(prefix)) { return getNodeValue(nsnode); } } } BasisLibrary.runTimeError(BasisLibrary.NAMESPACE_PREFIX_ERR, prefix); return null; }
Example 5
Source File: SAXImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Returns a deep copy of this iterator. The cloned iterator is not * reset. * * @return a deep copy of this iterator. */ public DTMAxisIterator cloneIterator() { try { DTMAxisIterator nestedClone = m_baseIterator.cloneIterator(); NamespaceWildcardIterator clone = (NamespaceWildcardIterator) super.clone(); clone.m_baseIterator = nestedClone; clone.m_nsType = m_nsType; clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 6
Source File: AbsoluteIterator.java From JDKSourceCode1.8 with MIT License | 5 votes |
public DTMAxisIterator cloneIterator() { try { final AbsoluteIterator clone = (AbsoluteIterator) super.clone(); clone._source = _source.cloneIterator(); // resets source clone.resetPosition(); clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 7
Source File: DupFilterIterator.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { final DupFilterIterator clone = (DupFilterIterator) super.clone(); clone._nodes = (IntegerArray) _nodes.clone(); clone._source = _source.cloneIterator(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 8
Source File: MultiDOM.java From Bytecoder with Apache License 2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { NodeValueIterator clone = (NodeValueIterator)super.clone(); clone._source = _source.cloneIterator(); clone.setRestartable(false); return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 9
Source File: AbsoluteIterator.java From hottub with GNU General Public License v2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { final AbsoluteIterator clone = (AbsoluteIterator) super.clone(); clone._source = _source.cloneIterator(); // resets source clone.resetPosition(); clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 10
Source File: SAXImpl.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * This is a shortcut to the iterators that implement the * supported XPath axes (only namespace::) is not supported. * Returns a bare-bones iterator that must be initialized * with a start node (using iterator.setStartNode()). */ public DTMAxisIterator getAxisIterator(final int axis) { switch (axis) { case Axis.SELF: return new SingletonIterator(); case Axis.CHILD: return new ChildrenIterator(); case Axis.PARENT: return new ParentIterator(); case Axis.ANCESTOR: return new AncestorIterator(); case Axis.ANCESTORORSELF: return (new AncestorIterator()).includeSelf(); case Axis.ATTRIBUTE: return new AttributeIterator(); case Axis.DESCENDANT: return new DescendantIterator(); case Axis.DESCENDANTORSELF: return (new DescendantIterator()).includeSelf(); case Axis.FOLLOWING: return new FollowingIterator(); case Axis.PRECEDING: return new PrecedingIterator(); case Axis.FOLLOWINGSIBLING: return new FollowingSiblingIterator(); case Axis.PRECEDINGSIBLING: return new PrecedingSiblingIterator(); case Axis.NAMESPACE: return new NamespaceIterator(); case Axis.ROOT: return new RootIterator(); default: BasisLibrary.runTimeError(BasisLibrary.AXIS_SUPPORT_ERR, Axis.getNames(axis)); } return null; }
Example 11
Source File: MultiDOM.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { NodeValueIterator clone = (NodeValueIterator)super.clone(); clone._source = _source.cloneIterator(); clone.setRestartable(false); return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 12
Source File: AdaptiveResultTreeImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void addAttribute(String uri, String localName, String qname, String type, String value) { if (_openElementName != null) { _attributes.addAttribute(uri, localName, qname, type, value); } else { BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, qname); } }
Example 13
Source File: AbsoluteIterator.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { final AbsoluteIterator clone = (AbsoluteIterator) super.clone(); clone._source = _source.cloneIterator(); // resets source clone.resetPosition(); clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 14
Source File: NthIterator.java From Bytecoder with Apache License 2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { final NthIterator clone = (NthIterator) super.clone(); clone._source = _source.cloneIterator(); // resets source clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 15
Source File: NthIterator.java From hottub with GNU General Public License v2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { final NthIterator clone = (NthIterator) super.clone(); clone._source = _source.cloneIterator(); // resets source clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 16
Source File: FilterIterator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { final FilterIterator clone = (FilterIterator) super.clone(); clone._source = _source.cloneIterator(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 17
Source File: NodeIteratorBase.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Clones and resets this iterator. Note that the cloned iterator is * not restartable. This is because cloning is needed for variable * references, and the context node of the original variable * declaration must be preserved. */ public NodeIterator cloneIterator() { try { final NodeIteratorBase clone = (NodeIteratorBase)super.clone(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 18
Source File: SAXImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * This is a shortcut to the iterators that implement the * supported XPath axes (only namespace::) is not supported. * Returns a bare-bones iterator that must be initialized * with a start node (using iterator.setStartNode()). */ public DTMAxisIterator getAxisIterator(final int axis) { switch (axis) { case Axis.SELF: return new SingletonIterator(); case Axis.CHILD: return new ChildrenIterator(); case Axis.PARENT: return new ParentIterator(); case Axis.ANCESTOR: return new AncestorIterator(); case Axis.ANCESTORORSELF: return (new AncestorIterator()).includeSelf(); case Axis.ATTRIBUTE: return new AttributeIterator(); case Axis.DESCENDANT: return new DescendantIterator(); case Axis.DESCENDANTORSELF: return (new DescendantIterator()).includeSelf(); case Axis.FOLLOWING: return new FollowingIterator(); case Axis.PRECEDING: return new PrecedingIterator(); case Axis.FOLLOWINGSIBLING: return new FollowingSiblingIterator(); case Axis.PRECEDINGSIBLING: return new PrecedingSiblingIterator(); case Axis.NAMESPACE: return new NamespaceIterator(); case Axis.ROOT: return new RootIterator(); default: BasisLibrary.runTimeError(BasisLibrary.AXIS_SUPPORT_ERR, Axis.getNames(axis)); } return null; }
Example 19
Source File: MatchingIterator.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public DTMAxisIterator cloneIterator() { try { final MatchingIterator clone = (MatchingIterator) super.clone(); clone._source = _source.cloneIterator(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
Example 20
Source File: SAXImpl.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * Similar to getAxisIterator, but this one returns an iterator * containing nodes of a typed axis (ex.: child::foo) */ public DTMAxisIterator getTypedAxisIterator(int axis, int type) { // Most common case handled first if (axis == Axis.CHILD) { return new TypedChildrenIterator(type); } if (type == NO_TYPE) { return(EMPTYITERATOR); } switch (axis) { case Axis.SELF: return new TypedSingletonIterator(type); case Axis.CHILD: return new TypedChildrenIterator(type); case Axis.PARENT: return new ParentIterator().setNodeType(type); case Axis.ANCESTOR: return new TypedAncestorIterator(type); case Axis.ANCESTORORSELF: return (new TypedAncestorIterator(type)).includeSelf(); case Axis.ATTRIBUTE: return new TypedAttributeIterator(type); case Axis.DESCENDANT: return new TypedDescendantIterator(type); case Axis.DESCENDANTORSELF: return (new TypedDescendantIterator(type)).includeSelf(); case Axis.FOLLOWING: return new TypedFollowingIterator(type); case Axis.PRECEDING: return new TypedPrecedingIterator(type); case Axis.FOLLOWINGSIBLING: return new TypedFollowingSiblingIterator(type); case Axis.PRECEDINGSIBLING: return new TypedPrecedingSiblingIterator(type); case Axis.NAMESPACE: return new TypedNamespaceIterator(type); case Axis.ROOT: return new TypedRootIterator(type); default: BasisLibrary.runTimeError(BasisLibrary.TYPED_AXIS_SUPPORT_ERR, Axis.getNames(axis)); } return null; }