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


Java XPathTokenTypes.OR属性代码示例

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


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

示例1: visitXPathBinaryExpression

@Override
public void visitXPathBinaryExpression(XPathBinaryExpression parent) {
  if (myExpression == parent.getROperand()) {
    final XPathElementType op = parent.getOperator();
    final XPathExpression lop = parent.getLOperand();
    if (op == XPathTokenTypes.AND || op == XPathTokenTypes.OR) {
      myExpectedType = XPathType.BOOLEAN;
    } else if (XPath2TokenTypes.NUMBER_OPERATIONS.contains(op)) {
      if (isXPath1(myExpression)) {
        myExpectedType = XPathType.NUMBER;
      } else {
        myExpectedType = matchingType(lop, op);
      }
    } else if (XPath2TokenTypes.COMP_OPS.contains(op)) {
      if (lop != null && lop.getType() != XPathType.NODESET) {
        if ((myExpectedType = lop.getType()) == XPathType.BOOLEAN) {
          if (!isXPath1(myExpression)) myExpectedType = XPath2Type.BOOLEAN_STRICT;
        } else if (myExpectedType == XPath2Type.BOOLEAN) {
          myExpectedType = XPath2Type.BOOLEAN_STRICT;
        }
      } else {
        myExpectedType = XPathType.UNKNOWN;
      }
    } else if (XPath2TokenTypes.INTERSECT_EXCEPT.contains(op)) {
      myExpectedType = XPath2SequenceType.create(XPath2Type.NODE, XPath2SequenceType.Cardinality.ZERO_OR_MORE);
    } else if (op == XPath2TokenTypes.TO) {
      myExpectedType = XPath2Type.INTEGER;
    } else {
      myExpectedType = XPathType.UNKNOWN;
    }
  } else {
    super.visitXPathBinaryExpression(parent);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:ExpectedTypeUtil.java


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