@Override public String toShortString() { if (original != null) { return original.toShortString(); } else { return "error(\"" + message + "\")"; } }
public static String parenthesizeShort(Expression exp) { if (hasTwoOrMoreOperands(exp)) { return "(" + exp.toShortString() + ")"; } else { return exp.toShortString(); } }
@Override public String toShortString() { return "consume(" + getBaseExpression().toShortString() + ")"; } }
/** * Produce a short string identifying the expression for use in error messages * * @return a short string, sufficient to identify the expression */ @Override public String toShortString() { return getLhsExpression().toShortString() + " " + Token.tokens[operator] + " " + comparand; }
@Override public String toShortString() { return "sort(" + getBaseExpression().toShortString() + ")"; }
@Override public String toShortString() { return "(" + child(0).toShortString() + ", ...)"; }
@Override public String toShortString() { return getBaseExpression().toShortString(); }
@Override public String toShortString() { return "if(" + getCondition(0).toShortString() + ") then ... else ..."; }
@Override public String toShortString() { return getBaseExpression().toShortString(); }
/** * Get information about the containing package * @return package data */ public PackageData getPackageData() { try { return getRetainedStaticContext().getPackageData(); } catch (NullPointerException e) { throw new NullPointerException("Internal error: expression " + toShortString() + " has no retained static context"); } }
/** * Get the configuration containing this expression * * @return the containing Configuration */ public Configuration getConfiguration() { try { return getRetainedStaticContext().getConfiguration(); } catch (NullPointerException e) { throw new NullPointerException("Internal error: expression " + toShortString() + " has no retained static context"); } }
/** * Get information about the containing package * @return package data */ public PackageData getPackageData() { try { return getRetainedStaticContext().getPackageData(); } catch (NullPointerException e) { throw new NullPointerException("Internal error: expression " + toShortString() + " has no retained static context"); } }
public String toShortString() { return (operator == Token.SOME ? "some" : "every") + " $" + getVariableName() + " in " + getSequence().toShortString() + " satisfies ..."; }
private String parenthesize(Expression operand) { String operandStr = operand.toShortString(); if (operand instanceof BinaryExpression && XPathParser.operatorPrecedence(((BinaryExpression) operand).operator) < XPathParser.operatorPrecedence(operator)) { operandStr = "(" + operandStr + ")"; } return operandStr; }
/** * Produce a short string identifying the expression for use in error messages * * @return a short string, sufficient to identify the expression */ @Override public String toShortString() { String occ = Cardinality.getOccurrenceIndicator(targetCardinality); return getBaseExpression().toShortString() + " instance of " + targetType.toString() + occ; }
@Override public String toShortString() { return "for $" + getVariableQName().getDisplayName() + " in " + (getSequence() == null ? "(...)" : getSequence().toShortString()) + " return " + (getAction() == null ? "(...)" : getAction().toShortString()); }
public String toShortString() { FastStringBuffer fsb = new FastStringBuffer(FastStringBuffer.C64); fsb.append("where "); fsb.append(getPredicate().toShortString()); return fsb.toString(); }
/** * Produce a short string identifying the expression for use in error messages * * @return a short string, sufficient to identify the expression */ @Override public String toShortString() { FastStringBuffer sb = new FastStringBuffer(FastStringBuffer.C64); sb.append(clauses.get(0).toShortString()); sb.append(" ... return "); sb.append(getReturnClause().toShortString()); return sb.toString(); }
public String toShortString() { FastStringBuffer fsb = new FastStringBuffer(FastStringBuffer.C64); fsb.append("let $"); fsb.append(rangeVariable.getVariableQName().getDisplayName()); fsb.append(" := "); fsb.append(getSequence().toShortString()); return fsb.toString(); }
protected Expression generateApplyCall(Expression functionItem, ArrayList<Expression> args) throws XPathException { SquareArrayConstructor block = new SquareArrayConstructor(args); RetainedStaticContext rsc = new RetainedStaticContext(getStaticContext()); SystemFunction fn = VendorFunctionSetHE.getInstance().makeFunction("apply", 2); fn.setRetainedStaticContext(rsc); Expression call = fn.makeFunctionCall(functionItem, block); ((ApplyFn) fn).setDynamicFunctionCall(functionItem.toShortString()); setLocation(call, t.currentTokenStartOffset); return call; }