net.sf.saxon.om.Item.materialize()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中net.sf.saxon.om.Item.materialize()方法的一些代码示例,展示了Item.materialize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Item.materialize()方法的具体详情如下:
包路径:net.sf.saxon.om.Item
类名称:Item
方法名:materialize

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);

相关文章