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

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

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

XMLElement.hasChildNodes介绍

暂无

代码示例

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

private String consumeAsTextMessage(XMLElement elem, MessagesWriter messages)
   throws UnableToCompleteException {
  if (!elem.hasChildNodes()) {
   writer.die(elem, "Empty message");
  }

  MessageWriter message = messages.newMessage(elem);
  PlaceholderInterpreter interpreter =
    new TextPlaceholderInterpreter(writer, message);
  message.setDefaultMessage(elem.consumeInnerText(interpreter));
  return messages.declareMessage(message);
 }
}

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

public String interpretElement(XMLElement elem)
   throws UnableToCompleteException {
  MessagesWriter messages = uiWriter.getMessages();
  if (messages.isMessage(elem)) {
   if (!elem.hasChildNodes()) {
    uiWriter.die(elem, "Empty message");
   }

   MessageWriter message = messages.newMessage(elem);
   message.setDefaultMessage(elem.consumeInnerHtml(phiProvider.get(message)));
   return uiWriter.tokenForSafeConstant(elem, messages.declareMessage(message));
  }

  return null;
 }
}

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

if (child.hasChildNodes() || child.getAttributeCount() > 0) {
 logger.die(this, "Illegal child %s in a text-only context. "
   + "Perhaps you are trying to use unescaped HTML "

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

if (child.hasChildNodes() || child.getAttributeCount() > 0) {
 logger.die(this, "Illegal child %s in a text-only context. "
   + "Perhaps you are trying to use unescaped HTML "

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

if (child.hasChildNodes() || child.getAttributeCount() > 0) {
 logger.die(this, "Illegal child %s in a text-only context. "
   + "Perhaps you are trying to use unescaped HTML "

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

if (child.hasChildNodes() || child.getAttributeCount() > 0) {
 logger.die(this, "Illegal child %s in a text-only context. "
   + "Perhaps you are trying to use unescaped HTML "

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

private String consumeAsTextMessage(XMLElement elem, MessagesWriter messages)
   throws UnableToCompleteException {
  if (!elem.hasChildNodes()) {
   writer.die(elem, "Empty message");
  }

  MessageWriter message = messages.newMessage(elem);
  PlaceholderInterpreter interpreter =
    new TextPlaceholderInterpreter(writer, message);
  message.setDefaultMessage(elem.consumeInnerText(interpreter));
  return messages.declareMessage(message);
 }
}

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

private String consumeAsTextMessage(XMLElement elem, MessagesWriter messages)
   throws UnableToCompleteException {
  if (!elem.hasChildNodes()) {
   writer.die(elem, "Empty message");
  }

  MessageWriter message = messages.newMessage(elem);
  PlaceholderInterpreter interpreter =
    new TextPlaceholderInterpreter(writer, message);
  message.setDefaultMessage(elem.consumeInnerText(interpreter));
  return messages.declareMessage(message);
 }
}

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

@Override
public void parse(XMLElement elem, String fieldName, JClassType type,
    UiBinderWriter writer) throws UnableToCompleteException {
  if (elem.hasAttribute(ATTR_RESOURCE) && elem.hasChildNodes()) {
    writer.die("In %s, attribute \"%s\" and inline svg are mutually exclusive", elem, ATTR_RESOURCE);
  if (!(elem.hasAttribute(ATTR_RESOURCE) || elem.hasChildNodes())) {
    writer.die("In %s, attribute \"%s\" or inline svg must be present", elem, ATTR_RESOURCE);

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

@Override
public void parse(XMLElement elem, String fieldName, JClassType type,
    UiBinderWriter writer) throws UnableToCompleteException {
  if (elem.hasAttribute(ATTR_RESOURCE) && elem.hasChildNodes()) {
    writer.die("In %s, attribute \"%s\" and inline svg are mutually exclusive", elem, ATTR_RESOURCE);
  if (!(elem.hasAttribute(ATTR_RESOURCE) || elem.hasChildNodes())) {
    writer.die("In %s, attribute \"%s\" or inline svg must be present", elem, ATTR_RESOURCE);

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

public String interpretElement(XMLElement elem)
   throws UnableToCompleteException {
  MessagesWriter messages = uiWriter.getMessages();
  if (messages.isMessage(elem)) {
   if (!elem.hasChildNodes()) {
    uiWriter.die(elem, "Empty message");
   }

   MessageWriter message = messages.newMessage(elem);
   message.setDefaultMessage(elem.consumeInnerHtml(phiProvider.get(message)));
   return uiWriter.tokenForSafeConstant(elem, messages.declareMessage(message));
  }

  return null;
 }
}

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

public String interpretElement(XMLElement elem)
   throws UnableToCompleteException {
  MessagesWriter messages = uiWriter.getMessages();
  if (messages.isMessage(elem)) {
   if (!elem.hasChildNodes()) {
    uiWriter.die(elem, "Empty message");
   }

   MessageWriter message = messages.newMessage(elem);
   message.setDefaultMessage(elem.consumeInnerHtml(phiProvider.get(message)));
   return uiWriter.tokenForSafeConstant(elem, messages.declareMessage(message));
  }

  return null;
 }
}

相关文章

XMLElement类方法