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


Java XPathVersion類代碼示例

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


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

示例1: isWellFormed

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
public boolean isWellFormed() {
  final String text = getUnescapedText();
  final char quoteChar = getQuoteChar();
  if (!text.endsWith(String.valueOf(quoteChar)) || text.indexOf(quoteChar) == text.lastIndexOf(quoteChar)) {
    return false;
  }

  if (getXPathVersion() == XPathVersion.V2) {
    final String value = getStringBetweenQuotes();
    final String unescaped = unescape(quoteChar, value);
    return escape(quoteChar, unescaped).equals(value);
  } else {
    if (getValue().indexOf(quoteChar) != -1) {
      return false;
    }
  }

  return !textContains('\n') && !textContains('\r');
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:XPathStringImpl.java

示例2: createFunctionMap

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
@Override
protected Map<Pair<QName, Integer>, Function> createFunctionMap(ContextType type) {
  final XPathVersion version = type.getVersion();
  if (version == XPathVersion.V1) {
    return DEFAULT_FUNCTIONS_V1;
  } else if (version == XPathVersion.V2) {
    return DEFAULT_FUNCTIONS_V2;
  } else {
    throw new IllegalStateException("Unsupprted version: " + version);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:12,代碼來源:DefaultFunctionContext.java

示例3: getType

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
@NotNull
public XPathType getType() {
  if (getXPathVersion() == XPathVersion.V1) {
    return XPathType.NUMBER;
  } else {
    if (isScientificNotation()) {
      return XPath2Type.DOUBLE;
    } else if (textContains('.')) {
      return XPath2Type.DECIMAL;
    }
    return XPath2Type.INTEGER;
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:XPathNumberImpl.java

示例4: getType

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
@NotNull
public XPathType getType() {
  final XPathStep step = getFirstStep();
  if (step != null) {
    final XPathExpression expr = step.getStep();
    if (expr != null) {
      return expr.getType();
    }
  }
  return getXPathVersion() == XPathVersion.V1 ?
            XPathType.NODESET : XPath2Type.SEQUENCE;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:XPathLocationPathImpl.java

示例5: getValue

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
public String getValue() {
  final String value = getStringBetweenQuotes();
  if (getXPathVersion() == XPathVersion.V2) {
    return unescape(getQuoteChar(), value);
  }
  return value;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:8,代碼來源:XPathStringImpl.java

示例6: mapType

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
public static XPathType mapType(XPathExpression context, XPathType type) {
  return context.getXPathVersion() == XPathVersion.V2 ? XPath2Type.mapType(type) : type;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:ExpectedTypeUtil.java

示例7: isXPath1

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
private static boolean isXPath1(XPathExpression expression) {
  return expression.getXPathVersion() == XPathVersion.V1;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:ExpectedTypeUtil.java

示例8: getXPathVersion

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
public XPathVersion getXPathVersion() {
  throw new UnsupportedOperationException();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:XsltElementImpl.java

示例9: LanguageLevel

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
LanguageLevel(XPathVersion version) {
  myVersion = version;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:XsltChecker.java

示例10: getXPathVersion

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
public XPathVersion getXPathVersion() {
  return myVersion;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:XsltChecker.java

示例11: getXPathVersion

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
@Override
public XPathVersion getXPathVersion() {
  return getLanguage() instanceof XPath2Language ? XPathVersion.V2 : XPathVersion.V1;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:XPathFile.java

示例12: getNodeTypeCompletions

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
public static Collection<Lookup> getNodeTypeCompletions(XPathElement context) {
  final Set<String> funcs = context.getXPathVersion() == XPathVersion.V1 ?
          NODE_TYPE_FUNCS : NODE_TYPE_FUNCS_V2;

  return ContainerUtil.map(funcs, FUNCTION_MAPPING);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:CompletionLists.java

示例13: getXPathVersion

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
@Override
public XPathVersion getXPathVersion() {
  return getElement().getXPathVersion();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:XPathFunctionCallImpl.java

示例14: getXPathVersion

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
@Override
public XPathVersion getXPathVersion() {
  return getContainingFile().getXPathVersion();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:XPathElementImpl.java

示例15: getXPathVersion

import org.intellij.lang.xpath.context.XPathVersion; //導入依賴的package包/類
XPathVersion getXPathVersion(); 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:2,代碼來源:XPathElement.java


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