Package org.basex.query.func.java
Class JavaCall
java.lang.Object
org.basex.query.expr.ExprInfo
org.basex.query.expr.Expr
org.basex.query.expr.ParseExpr
org.basex.query.expr.Arr
org.basex.query.func.java.JavaCall
- Direct Known Subclasses:
StaticJavaCall
This class contains common methods for executing Java code and mapping
Java objects to XQuery values.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns a string description of the expression.protected abstract Objecteval(QueryContext qc) Returns the result of the evaluated Java function.static JavaCallget(QNm qname, Expr[] args, QueryContext qc, StaticContext sc, InputInfo ii) Returns a new Java function instance.final voidCreates a query plan.voidplan(QueryString qs) Creates a query string.static ValuetoValue(Object object, QueryContext qc, StaticContext sc) Converts the specified result to an XQuery value.protected static booleantypesMatch(Class<?>[] pTypes, String[] qTypes) Compares the types of method parameters with the specified types.final Valuevalue(QueryContext qc) Evaluates the expression and returns the resulting value.Methods inherited from class org.basex.query.expr.Arr
accept, allAreValues, args, checkUp, compile, copyAll, count, equals, exprSize, flatten, has, inline, inline, inlineable, mayBePositional, simplifyAllMethods inherited from class org.basex.query.expr.ParseExpr
adoptType, atomValue, checkAllUp, checkNoEmpty, checkNoEmpty, checkNoneUp, checkNoUp, checkType, checkType, checkUp, copyType, ctxValue, ebv, item, iter, refineType, seqType, size, test, toArray, toArray, toAtomItem, toB64, toB64, toBin, toBin, toBoolean, toBoolean, toBytes, toBytes, toDouble, toDouble, toElem, toFloat, toFunc, toItem, toItem, toLong, toLong, toMap, toMap, toNode, toNode, toNodeOrNull, toNumber, toNumberOrNull, toQNm, toQNm, toToken, toToken, toTokenOrNull, toZeroTokenMethods inherited from class org.basex.query.expr.Expr
arg, atomItem, atomIter, copy, data, data, ddo, funcType, hasFreeVars, indexAccessible, isSimple, markTailCalls, mergeEbv, optimize, simplifyFor, typeCheck, uses, vacuous, visitAllMethods inherited from class org.basex.query.expr.ExprInfo
toErrorString, toString
-
Method Details
-
value
Description copied from class:ExprEvaluates the expression and returns the resulting value. If this method is not implemented,Expr.item(QueryContext, InputInfo)must be implemented instead.- Overrides:
valuein classParseExpr- Parameters:
qc- query context- Returns:
- value
- Throws:
QueryException- query exception
-
eval
Returns the result of the evaluated Java function.- Parameters:
qc- query context- Returns:
- arguments
- Throws:
QueryException- query exception
-
toValue
Converts the specified result to an XQuery value.- Parameters:
object- result objectqc- query contextsc- static context- Returns:
- value
- Throws:
QueryException- query exception
-
get
public static JavaCall get(QNm qname, Expr[] args, QueryContext qc, StaticContext sc, InputInfo ii) throws QueryException Returns a new Java function instance.- Parameters:
qname- function nameargs- argumentsqc- query contextsc- static contextii- input info- Returns:
- Java function or
null - Throws:
QueryException- query exception
-
typesMatch
Compares the types of method parameters with the specified types.- Parameters:
pTypes- parameter typesqTypes- query types (can benull)- Returns:
- result of check
-
description
Description copied from class:ExprInfoReturns a string description of the expression. This method is only called by error messages. Contrary to theExprInfo.toString()method, arguments are not included in the output.- Overrides:
descriptionin classExprInfo- Returns:
- result of check
-
plan
Description copied from class:ExprInfoCreates a query plan. -
plan
Description copied from class:ExprInfoCreates a query string.
-