public final class StaticFunc extends StaticDecl implements XQFunction
Modifier and Type | Field and Description |
---|---|
Var[] |
args
Arguments.
|
anns, declType, dontEnter, name
Modifier and Type | Method and Description |
---|---|
AnnList |
annotations()
Annotations of this function.
|
QNm |
argName(int pos)
Name of the argument at the given position.
|
int |
arity()
Number of arguments this function takes.
|
void |
compile(QueryContext qc)
Compiles the expression contained in this scope.
|
QNm |
funcName()
Name of this function,
null means anonymous function. |
FuncType |
funcType()
Type of this function.
|
byte[] |
id()
Returns a unique identifier for this declaration.
|
static boolean |
inline(QueryContext qc,
AnnList anns,
Expr expr)
Checks if inlining conditions are given.
|
Expr |
inlineExpr(Expr[] exprs,
QueryContext qc,
VarScope scp,
InputInfo ii)
Tries to inline this function with the given argument expressions.
|
Item |
invItem(QueryContext qc,
InputInfo ii,
Value... arg)
Internally invokes this function with the given arguments.
|
Item |
invokeItem(QueryContext qc,
InputInfo ii,
Value... arg)
Invokes this function with the given arguments.
|
Value |
invokeValue(QueryContext qc,
InputInfo ii,
Value... arg)
Invokes this function with the given arguments.
|
Value |
invValue(QueryContext qc,
InputInfo ii,
Value... arg)
Internally invokes this function with the given arguments.
|
boolean |
isVacuous()
Checks if this function returns vacuous results (see
Expr.isVacuous() ). |
void |
plan(FElem plan)
Creates an expression tree.
|
int |
stackFrameSize()
Size of this function's stack frame.
|
String |
toString() |
boolean |
visit(ASTVisitor visitor)
Traverses this scope with the given
ASTVisitor . |
seqType
compiled, doc
addPlan, addPlan, description, planAttr, planElem, toErrorString
public final Var[] args
public void compile(QueryContext qc)
Scope
public void plan(FElem plan)
ExprInfo
public int arity()
XQFunctionExpr
arity
in interface XQFunctionExpr
public QNm funcName()
XQFunctionExpr
null
means anonymous function.funcName
in interface XQFunctionExpr
null
public QNm argName(int pos)
XQFunctionExpr
argName
in interface XQFunctionExpr
pos
- position of the argumentpublic FuncType funcType()
XQFunctionExpr
funcType
in interface XQFunctionExpr
public int stackFrameSize()
XQFunction
stackFrameSize
in interface XQFunction
public AnnList annotations()
XQFunctionExpr
annotations
in interface XQFunctionExpr
public Item invItem(QueryContext qc, InputInfo ii, Value... arg) throws QueryException
XQFunction
XQFunction.invokeItem(QueryContext, InputInfo, Value...)
instead.invItem
in interface XQFunction
qc
- query contextii
- input infoarg
- argumentsQueryException
- query exceptionpublic Value invValue(QueryContext qc, InputInfo ii, Value... arg) throws QueryException
XQFunction
XQFunction.invokeValue(QueryContext, InputInfo, Value...)
instead.invValue
in interface XQFunction
qc
- query contextii
- input infoarg
- argumentsQueryException
- query exceptionpublic Value invokeValue(QueryContext qc, InputInfo ii, Value... arg) throws QueryException
XQFunction
invokeValue
in interface XQFunction
qc
- query contextii
- input infoarg
- argumentsQueryException
- query exceptionpublic Item invokeItem(QueryContext qc, InputInfo ii, Value... arg) throws QueryException
XQFunction
invokeItem
in interface XQFunction
qc
- query contextii
- input infoarg
- argumentsQueryException
- query exceptionpublic boolean isVacuous()
Expr.isVacuous()
).public boolean visit(ASTVisitor visitor)
Scope
ASTVisitor
.public byte[] id()
StaticDecl
id
in class StaticDecl
public Expr inlineExpr(Expr[] exprs, QueryContext qc, VarScope scp, InputInfo ii) throws QueryException
XQFunctionExpr
inlineExpr
in interface XQFunctionExpr
exprs
- argument expressionsqc
- query contextscp
- variable scopeii
- input infonull
otherwiseQueryException
- query exceptionpublic static boolean inline(QueryContext qc, AnnList anns, Expr expr)
qc
- query contextanns
- annotationsexpr
- expressionCopyright © 2005–2015 BaseX Team. All rights reserved.