本文整理匯總了Java中org.intellij.lang.xpath.psi.XPathType.NUMBER屬性的典型用法代碼示例。如果您正苦於以下問題:Java XPathType.NUMBER屬性的具體用法?Java XPathType.NUMBER怎麽用?Java XPathType.NUMBER使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.intellij.lang.xpath.psi.XPathType
的用法示例。
在下文中一共展示了XPathType.NUMBER屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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;
}
示例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;
}
示例3: getType
@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;
}
}