当前位置: 首页>>代码示例>>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;未经允许,请勿转载。