|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.ExprInfo
org.basex.query.expr.Expr
org.basex.query.expr.ParseExpr
org.basex.query.expr.Arr
org.basex.query.func.JavaMapping
public abstract class JavaMapping
This class contains common methods for executing Java code and mapping Java objects to XQuery values.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary |
---|
Fields inherited from class org.basex.query.expr.Arr |
---|
expr |
Fields inherited from class org.basex.query.expr.ParseExpr |
---|
info, size, type |
Method Summary | |
---|---|
protected abstract java.lang.Object |
eval(Value[] args,
QueryContext ctx)
Returns the result of the evaluated Java function. |
protected static java.lang.String |
foundArgs(Value[] args)
Returns a string representation of all found arguments. |
boolean |
has(Expr.Flag flag)
Indicates if an expression has the specified compiler property. |
Iter |
iter(QueryContext ctx)
Evaluates the expression and returns an iterator on the resulting items. |
static Value |
toValue(java.lang.Object obj,
QueryContext ctx)
Converts the specified result to an XQuery value. |
protected static Type |
type(java.lang.Class<?> type)
Returns an appropriate XQuery data type for the specified Java class. |
static Type |
type(java.lang.Object o)
Returns an appropriate XQuery data type for the specified Java object. |
Value |
value(QueryContext ctx)
Evaluates the expression and returns the resulting value. |
Methods inherited from class org.basex.query.expr.Arr |
---|
accept, allAreValues, checkNoUp, checkUp, compile, copyAll, count, exprSize, indexEquivalent, inline, plan, removable, toString |
Methods inherited from class org.basex.query.expr.ParseExpr |
---|
checkAdmin, checkAllUp, checkBinary, checkBln, checkColl, checkCreate, checkCtx, checkDbl, checkDBNode, checkEStr, checkEStr, checkFunc, checkItem, checkItr, checkItr, checkMap, checkNode, checkNode, checkNode, checkNoEmpty, checkNoneUp, checkNoUp, checkQNm, checkStr, checkStr, checkStrBin, checkType, checkWrite, compBln, copyType, ebv, item, optPre, preEval, size, test, type |
Methods inherited from class org.basex.query.expr.Expr |
---|
addText, compEbv, copy, copy, hasFreeVars, indexAccessible, inlineAll, isEmpty, isFunction, isItem, isVacuous, isValue, iterable, markTailCalls, optimize, sameAs, uses, visitAll |
Methods inherited from class org.basex.data.ExprInfo |
---|
addPlan, addPlan, description, info, planAttr, planElem, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final Iter iter(QueryContext ctx) throws QueryException
Expr
Expr.item(org.basex.query.QueryContext, org.basex.util.InputInfo)
must be implemented
by an expression, as it may be called by this method.
iter
in class ParseExpr
ctx
- query context
QueryException
- query exceptionpublic final Value value(QueryContext ctx) throws QueryException
Expr
value
in class ParseExpr
ctx
- query context
QueryException
- query exceptionprotected abstract java.lang.Object eval(Value[] args, QueryContext ctx) throws QueryException
args
- argumentsctx
- query context
QueryException
- query exceptionpublic static Value toValue(java.lang.Object obj, QueryContext ctx) throws QueryException
obj
- result objectctx
- query context
QueryException
- query exceptionpublic static Type type(java.lang.Object o)
o
- object
null
if no appropriate type was foundprotected static Type type(java.lang.Class<?> type)
type
- Java type
protected static java.lang.String foundArgs(Value[] args)
args
- array with arguments
public boolean has(Expr.Flag flag)
Expr
Expr.compile(org.basex.query.QueryContext, org.basex.query.var.VarScope)
methods to test properties of sub-expressions.
It returns true
if at least one test is successful.
has
in class Arr
flag
- flag to be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |