com.google.gwt.uibinder.rebind.XMLElement.consumeUnescapedInnerText()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中com.google.gwt.uibinder.rebind.XMLElement.consumeUnescapedInnerText()方法的一些代码示例,展示了XMLElement.consumeUnescapedInnerText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLElement.consumeUnescapedInnerText()方法的具体详情如下:
包路径:com.google.gwt.uibinder.rebind.XMLElement
类名称:XMLElement
方法名:consumeUnescapedInnerText

XMLElement.consumeUnescapedInnerText介绍

[英]Returns the unprocessed, unescaped, raw inner text of the receiver. Dies if the receiver has non-text children.

You probably want to use #consumeInnerTextEscapedAsHtmlStringLiteral instead.
[中]返回接收者未经处理的、未经转换的原始内部文本。如果接收者有非文本子项,则死亡。
您可能想改用#ConsuminerTextEscapeDashtmlStringLiteral。

代码示例

代码示例来源:origin: net.wetheinter/gwt-user

private void createStyle(XMLElement elem) throws UnableToCompleteException {
 String body = elem.consumeUnescapedInnerText();
 String[] source = elem.consumeRawArrayAttribute(SOURCE_ATTRIBUTE);
 if (0 == body.length() && 0 == source.length) {
  writer.die(elem, "Must have either a src attribute or body text");
 }
 String name = elem.consumeRawAttribute(FIELD_ATTRIBUTE, "style");
 JClassType publicType = consumeCssResourceType(elem);
 String[] importTypeNames = elem.consumeRawArrayAttribute(IMPORT_ATTRIBUTE);
 LinkedHashSet<JClassType> importTypes = new LinkedHashSet<JClassType>();
 for (String type : importTypeNames) {
  importTypes.add(findCssResourceType(elem, type));
 }
 Boolean gss = elem.consumeBooleanConstantAttribute(GSS_ATTRIBUTE);
 ImplicitCssResource cssMethod = bundleClass.createCssResource(name, source,
   publicType, body, importTypes, gss, resourceOracle);
 FieldWriter field = fieldManager.registerFieldForGeneratedCssResource(cssMethod);
 field.setInitializer(String.format("%s.%s()",
   fieldManager.convertFieldToGetter(bundleClass.getFieldName()),
   cssMethod.getName()));
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

private void createStyle(XMLElement elem) throws UnableToCompleteException {
 String body = elem.consumeUnescapedInnerText();
 String[] source = elem.consumeRawArrayAttribute(SOURCE_ATTRIBUTE);
 if (0 == body.length() && 0 == source.length) {
  writer.die(elem, "Must have either a src attribute or body text");
 }
 String name = elem.consumeRawAttribute(FIELD_ATTRIBUTE, "style");
 JClassType publicType = consumeCssResourceType(elem);
 String[] importTypeNames = elem.consumeRawArrayAttribute(IMPORT_ATTRIBUTE);
 LinkedHashSet<JClassType> importTypes = new LinkedHashSet<JClassType>();
 for (String type : importTypeNames) {
  importTypes.add(findCssResourceType(elem, type));
 }
 Boolean gss = elem.consumeBooleanConstantAttribute(GSS_ATTRIBUTE);
 ImplicitCssResource cssMethod = bundleClass.createCssResource(name, source,
   publicType, body, importTypes, gss, resourceOracle);
 FieldWriter field = fieldManager.registerFieldForGeneratedCssResource(cssMethod);
 field.setInitializer(String.format("%s.%s()",
   fieldManager.convertFieldToGetter(bundleClass.getFieldName()),
   cssMethod.getName()));
}

相关文章

XMLElement类方法