gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-21 09:11:05 29 4
gpt4 key购买 nike

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

XMLElement.consumeInnerTextEscapedAsHtmlStringLiteral介绍

[英]Consumes all child text nodes, and asserts that this element held only text. Trailing and leading whitespace is trimmed, and escaped for use as a string literal. Notice that HTML entities in the text are also escaped

This call requires an interpreter to make sense of any special children. The odds are you want to use com.google.gwt.uibinder.elementparsers.TextInterpreter
[中]使用所有子文本节点,并断言此元素仅包含文本。尾随和前导空格被修剪,并转义以用作字符串文字。请注意,文本中的HTML实体也被转义
这个电话需要翻译来理解任何特殊的孩子。你很可能想使用com。谷歌。gwt。尤宾德。元素分析器。文本解释器

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

@Override protected String consumePlaceholderInnards(XMLElement elem)
   throws UnableToCompleteException {
  return elem.consumeInnerTextEscapedAsHtmlStringLiteral(new NullInterpreter<String>());
 }
}

代码示例来源:origin: com.google.gwt/gwt-servlet

public void parse(XMLElement elem, String fieldName, JClassType type,
   UiBinderWriter writer) throws UnableToCompleteException {
  // Widgets that implement HasText will use their elements' inner text.
  String text = elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer));
  if (text.trim().length() > 0) {
   writer.genStringPropertySet(fieldName, "text", text);
  }
 }
}

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

/**
 * Consumes all child text nodes, and asserts that this element held only
 * text. Trailing and leading whitespace is trimmed, and escaped for use as a
 * string literal. Notice that HTML entities in the text are NOT escaped
 * <p>
 * This call requires an interpreter to make sense of any special children.
 * The odds are you want to use
 * {@link com.google.gwt.uibinder.elementparsers.TextInterpreter}
 *
 * @throws UnableToCompleteException If any elements present are not consumed
 *           by the interpreter
 */
public String consumeInnerTextEscapedAsStringLiteral(Interpreter<String> interpreter)
  throws UnableToCompleteException {
 return consumeInnerTextEscapedAsHtmlStringLiteral(interpreter, false);
}

代码示例来源:origin: laaglu/lib-gwt-svg

/**
 * Consumes all child text nodes, and asserts that this element held only
 * text. Trailing and leading whitespace is trimmed, and escaped for use as a
 * string literal. Notice that HTML entities in the text are also escaped
 * <p>
 * This call requires an interpreter to make sense of any special children.
 * The odds are you want to use
 * {@link com.google.gwt.uibinder.elementparsers.TextInterpreter}
 *
 * @throws UnableToCompleteException If any elements present are not consumed
 *           by the interpreter
 */
public String consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter<String> interpreter)
  throws UnableToCompleteException {
 return consumeInnerTextEscapedAsHtmlStringLiteral(interpreter, true);
}

代码示例来源:origin: org.vectomatic/lib-gwt-svg

/**
 * Consumes all child text nodes, and asserts that this element held only
 * text. Trailing and leading whitespace is trimmed, and escaped for use as a
 * string literal. Notice that HTML entities in the text are also escaped
 * <p>
 * This call requires an interpreter to make sense of any special children.
 * The odds are you want to use
 * {@link com.google.gwt.uibinder.elementparsers.TextInterpreter}
 *
 * @throws UnableToCompleteException If any elements present are not consumed
 *           by the interpreter
 */
public String consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter<String> interpreter)
  throws UnableToCompleteException {
 return consumeInnerTextEscapedAsHtmlStringLiteral(interpreter, true);
}

代码示例来源:origin: org.vectomatic/lib-gwt-svg

/**
 * Consumes all child text nodes, and asserts that this element held only
 * text. Trailing and leading whitespace is trimmed, and escaped for use as a
 * string literal. Notice that HTML entities in the text are NOT escaped
 * <p>
 * This call requires an interpreter to make sense of any special children.
 * The odds are you want to use
 * {@link com.google.gwt.uibinder.elementparsers.TextInterpreter}
 *
 * @throws UnableToCompleteException If any elements present are not consumed
 *           by the interpreter
 */
public String consumeInnerTextEscapedAsStringLiteral(Interpreter<String> interpreter)
  throws UnableToCompleteException {
 return consumeInnerTextEscapedAsHtmlStringLiteral(interpreter, false);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

String openImage = children.header.consumeImageResourceAttribute(OPEN_IMAGE);
String closedImage = children.header.consumeImageResourceAttribute(CLOSED_IMAGE);
String headerText = children.header.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(
  writer));

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

/**
 * Refines {@link #consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter)} to
 * handle PostProcessingInterpreter.
 */
public String consumeInnerText(PostProcessingInterpreter<String> interpreter)
  throws UnableToCompleteException {
 String text = consumeInnerTextEscapedAsHtmlStringLiteral(interpreter);
 return interpreter.postProcess(text);
}

代码示例来源:origin: org.vectomatic/lib-gwt-svg

/**
 * Refines {@link #consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter)} to
 * handle PostProcessingInterpreter.
 */
public String consumeInnerText(PostProcessingInterpreter<String> interpreter)
  throws UnableToCompleteException {
 String text = consumeInnerTextEscapedAsHtmlStringLiteral(interpreter);
 return interpreter.postProcess(text);
}

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

@Override protected String consumePlaceholderInnards(XMLElement elem)
   throws UnableToCompleteException {
  return elem.consumeInnerTextEscapedAsHtmlStringLiteral(new NullInterpreter<String>());
 }
}

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

@Override protected String consumePlaceholderInnards(XMLElement elem)
   throws UnableToCompleteException {
  return elem.consumeInnerTextEscapedAsHtmlStringLiteral(new NullInterpreter<String>());
 }
}

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

/**
 * Refines {@link #consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter)} to
 * handle PostProcessingInterpreter.
 */
public String consumeInnerText(PostProcessingInterpreter<String> interpreter)
  throws UnableToCompleteException {
 String text = consumeInnerTextEscapedAsHtmlStringLiteral(interpreter);
 return interpreter.postProcess(text);
}

代码示例来源:origin: laaglu/lib-gwt-svg

/**
 * Refines {@link #consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter)} to
 * handle PostProcessingInterpreter.
 */
public String consumeInnerText(PostProcessingInterpreter<String> interpreter)
  throws UnableToCompleteException {
 String text = consumeInnerTextEscapedAsHtmlStringLiteral(interpreter);
 return interpreter.postProcess(text);
}

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

public void parse(XMLElement elem, String fieldName, JClassType type,
   UiBinderWriter writer) throws UnableToCompleteException {
  // Widgets that implement HasText will use their elements' inner text.
  String text = elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer));
  if (text.trim().length() > 0) {
   writer.genStringPropertySet(fieldName, "text", text);
  }
 }
}

代码示例来源:origin: org.vectomatic/lib-gwt-svg

/**
 * Require that the receiver's body is empty of text.
 * 
 * @throws UnableToCompleteException if it isn't
 */
public void assertNoText() throws UnableToCompleteException {
 SimpleInterpeter<String> nullInterpreter = new SimpleInterpeter<String>(null);
 String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter);
 if (!"".equals(s)) {
  logger.die(this, "Unexpected text in element: \"%s\"", s);
 }
}

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

public void parse(XMLElement elem, String fieldName, JClassType type,
   UiBinderWriter writer) throws UnableToCompleteException {
  // Widgets that implement HasText will use their elements' inner text.
  String text = elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer));
  if (text.trim().length() > 0) {
   writer.genStringPropertySet(fieldName, "text", text);
  }
 }
}

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

/**
 * Require that the receiver's body is empty of text.
 * 
 * @throws UnableToCompleteException if it isn't
 */
public void assertNoText() throws UnableToCompleteException {
 SimpleInterpeter<String> nullInterpreter = new SimpleInterpeter<String>(null);
 String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter);
 if (!"".equals(s)) {
  logger.die(this, "Unexpected text in element: \"%s\"", s);
 }
}

代码示例来源:origin: laaglu/lib-gwt-svg

/**
 * Require that the receiver's body is empty of text.
 * 
 * @throws UnableToCompleteException if it isn't
 */
public void assertNoText() throws UnableToCompleteException {
 SimpleInterpeter<String> nullInterpreter = new SimpleInterpeter<String>(null);
 String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter);
 if (!"".equals(s)) {
  logger.die(this, "Unexpected text in element: \"%s\"", s);
 }
}

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

/**
 * Require that the receiver's body is empty of text.
 * 
 * @throws UnableToCompleteException if it isn't
 */
public void assertNoText() throws UnableToCompleteException {
 SimpleInterpeter<String> nullInterpreter = new SimpleInterpeter<String>(null);
 String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter);
 if (!"".equals(s)) {
  logger.die(this, "Unexpected text in element: \"%s\"", s);
 }
}

代码示例来源:origin: com.jhickman/gxt-uibinder

private String parseChildElement(XMLElement elem, JClassType valueType, UiBinderWriter writer) throws UnableToCompleteException {
    if ("value".equals(elem.getLocalName())) {
      return String.format("\"%s\"", elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer)));
    } else if ("item".equals(elem.getLocalName())) {
      return elem.consumeRequiredAttribute("value", valueType);
    }
    
    writer.die(elem, "Unknown child element of SimpleComboBox");
    
    return null; // will never get here
  }
}

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com