当前位置: 首页>>代码示例>>Java>>正文


Java XPathType.STRING属性代码示例

本文整理汇总了Java中org.intellij.lang.xpath.psi.XPathType.STRING属性的典型用法代码示例。如果您正苦于以下问题:Java XPathType.STRING属性的具体用法?Java XPathType.STRING怎么用?Java XPathType.STRING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.intellij.lang.xpath.psi.XPathType的用法示例。


在下文中一共展示了XPathType.STRING属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isCheckedConversion

private boolean isCheckedConversion(XPathType exprType, XPathType type) {

            if (exprType == XPathType.NODESET) {
                if (type == XPathType.STRING && OPTIONS.get(0)) return true;
                if (type == XPathType.NUMBER && OPTIONS.get(4)) return true;
                if (type == XPathType.BOOLEAN && OPTIONS.get(8)) return true;
            } else if (exprType == XPathType.STRING) {
                if (type == XPathType.NUMBER && OPTIONS.get(5)) return true;
                if (type == XPathType.BOOLEAN && OPTIONS.get(9)) return true;
            } else if (exprType == XPathType.NUMBER) {
                if (type == XPathType.STRING && OPTIONS.get(2)) return true;
                if (type == XPathType.BOOLEAN && OPTIONS.get(10)) return true;
            } else if (exprType == XPathType.BOOLEAN) {
                if (type == XPathType.STRING && OPTIONS.get(3)) return true;
                if (type == XPathType.NUMBER && OPTIONS.get(11)) return true;
            }
            return false;
        }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ImplicitTypeConversion.java

示例2: getTypeForTag

protected XPathType getTypeForTag(XmlTag tag, String attribute) {
  String tagName = tag.getLocalName();
  if ("select".equals(attribute)) {
    if ("copy-of".equals(tagName) || "for-each".equals(tagName) || "apply-templates".equals(tagName)) {
      return XPathType.NODESET;
    } else if ("value-of".equals(tagName) || "sort".equals(tagName)) {
      return XPathType.STRING;
    }
    return XPathType.ANY;
  } else if ("test".equals(attribute)) {
    if ("if".equals(tagName) || "when".equals(tagName)) {
      return XPathType.BOOLEAN;
    }
  } else if ("number".equals(attribute)) {
    if ("value".equals(tagName)) {
      return XPathType.NUMBER;
    }
  }
  return XPathType.UNKNOWN;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:XsltContextProviderBase.java

示例3: checkExpressionOfType

private void checkExpressionOfType(@NotNull XPathExpression expression, XPathType type, boolean explicit) {
    final XPathType exprType = expression.getType();
    if (exprType.isAbstract() || type.isAbstract()) return;

    if (exprType != type && (explicit || isCheckedConversion(exprType, type))) {
        if (explicit && exprType == XPathType.STRING && type == XPathType.BOOLEAN) {
            final XPathExpression expr = ExpectedTypeUtil.unparenthesize(expression);
            if (expr instanceof XPathFunctionCall && IGNORE_NODESET_TO_BOOLEAN_VIA_STRING &&
                    ((XPathFunctionCall)expr).getArgumentList()[0].getType() == XPathType.NODESET)
            {
                return;
            }
        }

        final LocalQuickFix[] fixes;
        if (type != XPathType.NODESET) {
            final XPathQuickFixFactory fixFactory = ContextProvider.getContextProvider(expression).getQuickFixFactory();
            explicit = explicit && !(exprType == XPathType.STRING && type == XPathType.BOOLEAN);
            fixes = fixFactory.createImplicitTypeConversionFixes(expression, type, explicit);
        } else {
            fixes = null;
        }

        addProblem(myManager.createProblemDescriptor(expression,
                "Expression should be of type '" + type.getName() + "'", myOnTheFly, fixes,
                ProblemHighlightType.GENERIC_ERROR_OR_WARNING));
    }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:ImplicitTypeConversion.java

示例4: getType

@NotNull
public XPathType getType() {
  return XPathType.STRING;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:XPathStringImpl.java

示例5: FileTypeFunction

public FileTypeFunction() {
    super("file-type", XPathType.STRING, new Parameter(XPathType.NODESET, Parameter.Kind.OPTIONAL));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:FileTypeFunction.java

示例6: FileNameFunction

public FileNameFunction() {
    super("file-name", XPathType.STRING, new Parameter(XPathType.NODESET, Parameter.Kind.OPTIONAL));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:FileNameFunction.java

示例7: JaxenEvaluate

public JaxenEvaluate() {
    super("evaluate", XPathType.NODESET,
            new Parameter(XPathType.STRING, Parameter.Kind.REQUIRED));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:XPathFunctionProviderImpl.java

示例8: JaxenLower

public JaxenLower() {
    super("lower-case", XPathType.STRING,
            new Parameter(XPathType.STRING, Parameter.Kind.REQUIRED),
            new Parameter(XPathType.STRING, Parameter.Kind.OPTIONAL));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:XPathFunctionProviderImpl.java

示例9: JaxenUpper

public JaxenUpper() {
    super("upper-case", XPathType.STRING,
            new Parameter(XPathType.STRING, Parameter.Kind.REQUIRED),
            new Parameter(XPathType.STRING, Parameter.Kind.OPTIONAL));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:XPathFunctionProviderImpl.java

示例10: JaxenEndsWith

public JaxenEndsWith() {
    super("ends-with", XPathType.BOOLEAN,
            new Parameter(XPathType.STRING, Parameter.Kind.REQUIRED),
            new Parameter(XPathType.STRING, Parameter.Kind.REQUIRED));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:XPathFunctionProviderImpl.java

示例11: FileExtensionFunction

public FileExtensionFunction() {
    super("file-ext", XPathType.STRING, new Parameter(XPathType.NODESET, Parameter.Kind.OPTIONAL));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:FileExtensionFunction.java


注:本文中的org.intellij.lang.xpath.psi.XPathType.STRING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。