當前位置: 首頁>>代碼示例>>Java>>正文


Java IllegalNameException類代碼示例

本文整理匯總了Java中org.jdom.IllegalNameException的典型用法代碼示例。如果您正苦於以下問題:Java IllegalNameException類的具體用法?Java IllegalNameException怎麽用?Java IllegalNameException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IllegalNameException類屬於org.jdom包,在下文中一共展示了IllegalNameException類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: xppToElement

import org.jdom.IllegalNameException; //導入依賴的package包/類
private static Element xppToElement(Xpp3Dom xpp) throws RemoteException {
  Element result;
  try {
    result = new Element(xpp.getName());
  }
  catch (IllegalNameException e) {
    Maven3ServerGlobals.getLogger().info(e);
    return null;
  }

  Xpp3Dom[] children = xpp.getChildren();
  if (children == null || children.length == 0) {
    result.setText(xpp.getValue());
  }
  else {
    for (Xpp3Dom each : children) {
      Element child = xppToElement(each);
      if (child != null) result.addContent(child);
    }
  }
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:23,代碼來源:MavenModelConverter.java

示例2: xppToElement

import org.jdom.IllegalNameException; //導入依賴的package包/類
private static Element xppToElement(Xpp3Dom xpp) throws RemoteException {
  Element result;
  try {
    result = new Element(xpp.getName());
  }
  catch (IllegalNameException e) {
    Maven2ServerGlobals.getLogger().info(e);
    return null;
  }

  Xpp3Dom[] children = xpp.getChildren();
  if (children == null || children.length == 0) {
    result.setText(xpp.getValue());
  }
  else {
    for (Xpp3Dom each : children) {
      Element child = xppToElement(each);
      if (child != null) result.addContent(child);
    }
  }
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:23,代碼來源:Maven2ModelConverter.java

示例3: convertXpp

import org.jdom.IllegalNameException; //導入依賴的package包/類
private static Element convertXpp(Xpp3Dom xpp3Dom) {
  Element result;
  try {
    result = new Element(xpp3Dom.getName());
  } catch (IllegalNameException e) {
    return null;
  }

  Xpp3Dom[] children = xpp3Dom.getChildren();
  if (children == null || children.length == 0) {
    result.setText(xpp3Dom.getValue());
  } else {
    for (Xpp3Dom child : children) {
      Element element = convertXpp(child);
      if (element != null) {
        result.addContent(element);
      }
    }
  }

  return result;
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:23,代碼來源:MavenModelUtil.java


注:本文中的org.jdom.IllegalNameException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。