/** * Determine the item type */ /*@NotNull*/ public ItemType getItemType() { return AnyItemType.getInstance(); }
/** * Get the item type. To avoid spurious compile-time type errors, we falsely declare that the * instruction can return anything * * @return AnyItemType */ /*@NotNull*/ public ItemType getItemType() { return AnyItemType.getInstance(); }
/** * Determine the data type of the expression, if possible * * @return Type.ITEM (meaning not known in advance) */ /*@NotNull*/ public ItemType getItemType() { return AnyItemType.getInstance(); }
/** * Determine the data type of the expression, if possible. * @return Type.ITEM, because we don't know the type of the supplied value * in advance. * @param th the type hierarchy cache */ public ItemType getItemType(TypeHierarchy th) { return AnyItemType.getInstance(); }
/** * Get a NodeTest that all the nodes matching this pattern must satisfy */ public ItemType getItemType() { return AnyItemType.getInstance(); }
/** * Deliberately avoid giving type information */ public ItemType getItemType() { return AnyItemType.getInstance(); } }
/** * Determine the data type of the expression, if possible * * @return Type.ITEM (meaning not known in advance) */ /*@NotNull*/ public ItemType getItemType() { return AnyItemType.getInstance(); }
/** * Get the required type of the context item. If no type has been explicitly declared for the context * item, an instance of AnyItemType (representing the type item()) is returned. * * @return the required type of the context item * @since 9.3 */ public ItemType getRequiredContextItemType() { return AnyItemType.getInstance(); }
/** * Get the required type of the context item. If no type has been explicitly declared for the context * item, an instance of AnyItemType (representing the type item()) is returned. * * @return the required type of the context item * @since 9.3 */ public ItemType getRequiredContextItemType() { return AnyItemType.getInstance(); }
/** * Get the required item type of the context item. If several required item types have been registered * (which only happens in XQuery with multiple modules) then this returns the first. * @return The first registered required item type */ public ItemType getRequiredItemType() { if (requiredItemTypes.isEmpty()) { return AnyItemType.getInstance(); } else { return requiredItemTypes.get(0); } }
/** * Determine the type of item returned by this instruction (only relevant if * it is an instruction). * @return the item type returned */ protected ItemType getReturnedItemType() { if (template==null) { return AnyItemType.getInstance(); } else { return template.getReturnedItemType(); } }
public static OperandUsage typeDeterminedUsage(net.sf.saxon.type.ItemType type) { if (type.isPlainType()) { return OperandUsage.ABSORPTION; } else if (type instanceof NodeTest || type == AnyItemType.getInstance()) { return OperandUsage.NAVIGATION; } else { return OperandUsage.INSPECTION; } }
private void init() { register("node-set", 1, NodeSetFn.class, AnyItemType.getInstance(), OPT, 0, 0) .arg(0, AnyItemType.getInstance(), OPT, EMPTY); register("object-type", 1, ObjectTypeFn.class, BuiltInAtomicType.STRING, ONE, 0, 0) .arg(0, AnyItemType.getInstance(), ONE, null); }
/** * Determine the item type of the value returned by the function */ @Override public ItemType getItemType() { if (itemType == AnyItemType.getInstance() && controllingInstruction != null) { itemType = controllingInstruction.getSelectExpression().getItemType(); } return itemType; }
/** * Get an Itemtype that all the items matching this pattern must satisfy */ public ItemType getItemType() { if (getPredicate() instanceof InstanceOfExpression) { InstanceOfExpression ioe = (InstanceOfExpression)getPredicate(); if (ioe.getBaseExpression() instanceof ContextItemExpression) { return ioe.getRequiredItemType(); } } return AnyItemType.getInstance(); }
/** * Get an Itemtype that all the items matching this pattern must satisfy */ public ItemType getItemType() { if (getPredicate() instanceof InstanceOfExpression) { InstanceOfExpression ioe = (InstanceOfExpression)getPredicate(); if (ioe.getBaseExpression() instanceof ContextItemExpression) { return ioe.getRequiredItemType(); } } return AnyItemType.getInstance(); }
public void export(ExpressionPresenter presenter) throws XPathException { presenter.startElement("p.simPos"); presenter.emitAttribute("test", nodeTest.toString()); if ("JS".equals(((ExpressionPresenter.ExportOptions) presenter.getOptions()).target)) { int targetVersion = ((ExpressionPresenter.ExportOptions) presenter.getOptions()).targetVersion; presenter.emitAttribute("jsTest", nodeTest.generateJavaScriptItemTypeTest(AnyItemType.getInstance(), targetVersion)); } presenter.emitAttribute("pos", position + ""); presenter.endElement(); }
@Override public void refineVariableType(ExpressionVisitor visitor, List<VariableReference> references, Expression returnExpr) { ItemType actualItemType = getSequence().getItemType(); if (actualItemType instanceof ErrorType) { actualItemType = AnyItemType.getInstance(); } for (VariableReference ref : references) { ref.refineVariableType(actualItemType, allowsEmpty ? StaticProperty.ALLOWS_ZERO_OR_ONE : StaticProperty.EXACTLY_ONE, null, getSequence().getSpecialProperties()); } }
@Override public void refineVariableType(ExpressionVisitor visitor, List<VariableReference> references, Expression returnExpr) { ItemType actualItemType = getSequence().getItemType(); if (actualItemType instanceof ErrorType) { actualItemType = AnyItemType.getInstance(); } for (VariableReference ref : references) { ref.refineVariableType(actualItemType, allowsEmpty ? StaticProperty.ALLOWS_ZERO_OR_ONE : StaticProperty.EXACTLY_ONE, null, getSequence().getSpecialProperties()); } }
public boolean effectiveBooleanValue(XPathContext context) throws XPathException { // EBV is independent of sequence order unless the sequence mixes atomic values and nodes ItemType type = argument[0].getItemType(context.getConfiguration().getTypeHierarchy()); if (type == AnyItemType.getInstance()) { return super.effectiveBooleanValue(context); } else { return argument[0].effectiveBooleanValue(context); } }