private void strBufToElementNameString() { // if (strBufOffset != -1) { // return ElementName.elementNameByBuffer(buf, strBufOffset, strBufLen); // } else { tagName = ElementName.elementNameByBuffer(strBuf, 0, strBufLen, interner); // } }
/** * Sets the tokenizer state and the associated element name. This should * only ever used to put the tokenizer into one of the states that have * a special end tag expectation. * * @param specialTokenizerState * the tokenizer state to set * @param endTagExpectation * the expected end tag for transitioning back to normal */ public void setStateAndEndTagExpectation(int specialTokenizerState, @Local String endTagExpectation) { this.stateSave = specialTokenizerState; if (specialTokenizerState == Tokenizer.DATA) { return; } @Auto char[] asArray = Portability.newCharArrayFromLocal(endTagExpectation); this.endTagExpectation = ElementName.elementNameByBuffer(asArray, asArray.length, interner); assert this.endTagExpectation != null; endTagExpectationToArray(); }
/** * Sets the tokenizer state and the associated element name. This should * only ever used to put the tokenizer into one of the states that have * a special end tag expectation. * * @param specialTokenizerState * the tokenizer state to set * @param endTagExpectation * the expected end tag for transitioning back to normal */ public void setStateAndEndTagExpectation(int specialTokenizerState, @Local String endTagExpectation) { this.stateSave = specialTokenizerState; if (specialTokenizerState == Tokenizer.DATA) { return; } @Auto char[] asArray = Portability.newCharArrayFromLocal(endTagExpectation); this.endTagExpectation = ElementName.elementNameByBuffer(asArray, asArray.length, interner); assert this.endTagExpectation != null; endTagExpectationToArray(); }
/** * Sets the tokenizer state and the associated element name. This should * only ever used to put the tokenizer into one of the states that have * a special end tag expectation. * * @param specialTokenizerState * the tokenizer state to set * @param endTagExpectation * the expected end tag for transitioning back to normal */ public void setStateAndEndTagExpectation(int specialTokenizerState, @Local String endTagExpectation) { this.stateSave = specialTokenizerState; if (specialTokenizerState == Tokenizer.DATA) { return; } @Auto char[] asArray = Portability.newCharArrayFromLocal(endTagExpectation); this.endTagExpectation = ElementName.elementNameByBuffer(asArray, 0, asArray.length, interner); endTagExpectationToArray(); }
private void strBufToElementNameString() { if (containsHyphen) { // We've got a custom element or annotation-xml. @Local String annotationName = ElementName.ANNOTATION_XML.getName(); if (Portability.localEqualsBuffer(annotationName, strBuf, strBufLen)) { tagName = ElementName.ANNOTATION_XML; } else { nonInternedTagName.setNameForNonInterned(Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner) // CPPONLY: , true ); tagName = nonInternedTagName; } } else { tagName = ElementName.elementNameByBuffer(strBuf, strBufLen, interner); if (tagName == null) { nonInternedTagName.setNameForNonInterned(Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner) // CPPONLY: , false ); tagName = nonInternedTagName; } } containsHyphen = false; clearStrBufAfterUse(); }
private void strBufToElementNameString() { if (containsHyphen) { // We've got a custom element or annotation-xml. @Local String annotationName = ElementName.ANNOTATION_XML.getName(); if (Portability.localEqualsBuffer(annotationName, strBuf, strBufLen)) { tagName = ElementName.ANNOTATION_XML; } else { nonInternedTagName.setNameForNonInterned(Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner) // CPPONLY: , true ); tagName = nonInternedTagName; } } else { tagName = ElementName.elementNameByBuffer(strBuf, strBufLen, interner); if (tagName == null) { nonInternedTagName.setNameForNonInterned(Portability.newLocalNameFromBuffer(strBuf, strBufLen, interner) // CPPONLY: , false ); tagName = nonInternedTagName; } } containsHyphen = false; clearStrBufAfterUse(); }