本文整理了Java中net.sf.saxon.om.Item.materialize()
方法的一些代码示例,展示了Item.materialize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Item.materialize()
方法的具体详情如下:
包路径:net.sf.saxon.om.Item
类名称:Item
方法名:materialize
暂无
代码示例来源:origin: net.sf.saxon/Saxon-HE
/**
* Type-check the expression. Default implementation for binary operators that accept
* any kind of operand
*/
/*@NotNull*/
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException {
resetLocalStaticProperties();
lhs.typeCheck(visitor, contextInfo);
rhs.typeCheck(visitor, contextInfo);
// if both operands are known, pre-evaluate the expression
try {
if ((getLhsExpression() instanceof Literal) && (getRhsExpression() instanceof Literal)) {
GroundedValue<?> v = evaluateItem(visitor.getStaticContext().makeEarlyEvaluationContext()).materialize();
return Literal.makeLiteral(v, this);
}
} catch (XPathException err) {
// if early evaluation fails, suppress the error: the value might
// not be needed at run-time
}
return this;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
/**
* Type-check the expression. Default implementation for binary operators that accept
* any kind of operand
*/
/*@NotNull*/
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException {
resetLocalStaticProperties();
lhs.typeCheck(visitor, contextInfo);
rhs.typeCheck(visitor, contextInfo);
// if both operands are known, pre-evaluate the expression
try {
if ((getLhsExpression() instanceof Literal) && (getRhsExpression() instanceof Literal)) {
GroundedValue<?> v = evaluateItem(visitor.getStaticContext().makeEarlyEvaluationContext()).materialize();
return Literal.makeLiteral(v, this);
}
} catch (XPathException err) {
// if early evaluation fails, suppress the error: the value might
// not be needed at run-time
}
return this;
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
Item<?> item = evaluateItem(visitor.getStaticContext().makeEarlyEvaluationContext());
if (item != null) {
GroundedValue<?> v = item.materialize();
return Literal.makeLiteral(v, this);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
Item<?> item = evaluateItem(visitor.getStaticContext().makeEarlyEvaluationContext());
if (item != null) {
GroundedValue<?> v = item.materialize();
return Literal.makeLiteral(v, this);
内容来源于网络,如有侵权,请联系作者删除!