|
||||||||||
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.func.StaticFuncs
public final class StaticFuncs
Container for a user-defined function.
Constructor Summary | |
---|---|
StaticFuncs()
|
Method Summary | |
---|---|
void |
check(QueryContext qc)
Checks if all functions have been correctly declared, and initializes all function calls. |
void |
checkUp()
Checks if the functions perform updates. |
void |
compile(QueryContext ctx)
Compiles the functions. |
StaticFunc |
declare(Ann ann,
QNm nm,
Var[] args,
SeqType ret,
Expr body,
StaticContext sc,
VarScope scp,
java.lang.String xqdoc,
InputInfo ii)
Declares a new user-defined function. |
void |
errorIfSimilar(QNm name,
InputInfo ii)
Throws an error if the name of a function is similar to the specified function name. |
StaticFunc[] |
funcs()
Returns all user-defined functions. |
StaticFunc |
get(QNm name,
long arity,
InputInfo ii)
Returns the function with the given name and arity. |
TypedFunc |
getFuncRef(QNm name,
Expr[] args,
StaticContext sc,
InputInfo ii)
Returns a new reference to the function with the given name and arity. |
void |
plan(FElem plan)
Creates an expression tree. |
protected static byte[] |
sig(QNm name,
long arity)
returns the signature of the function with the given name and arity. |
java.lang.String |
toString()
|
Methods inherited from class org.basex.data.ExprInfo |
---|
addPlan, addPlan, description, info, planAttr, planElem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StaticFuncs()
Method Detail |
---|
protected static byte[] sig(QNm name, long arity)
name
- function namearity
- function arity
public StaticFunc declare(Ann ann, QNm nm, Var[] args, SeqType ret, Expr body, StaticContext sc, VarScope scp, java.lang.String xqdoc, InputInfo ii) throws QueryException
ann
- annotationsnm
- function nameargs
- formal parametersret
- return typebody
- function bodysc
- static contextscp
- variable scopexqdoc
- current xqdoc cacheii
- input info
QueryException
- query exceptionpublic TypedFunc getFuncRef(QNm name, Expr[] args, StaticContext sc, InputInfo ii) throws QueryException
name
- function nameargs
- argument expressionssc
- static context of the function callii
- input info
QueryException
- query exceptionpublic void check(QueryContext qc) throws QueryException
qc
- query context
QueryException
- query exceptionpublic void checkUp() throws QueryException
QueryException
- query exceptionpublic void compile(QueryContext ctx) throws QueryException
ctx
- query context
QueryException
- query exceptionpublic StaticFunc get(QNm name, long arity, InputInfo ii) throws QueryException
name
- function namearity
- function arityii
- input info
null
otherwise
QueryException
- query exceptionpublic void errorIfSimilar(QNm name, InputInfo ii) throws QueryException
name
- function nameii
- input info
QueryException
- query exceptionpublic void plan(FElem plan)
ExprInfo
plan
in class ExprInfo
plan
- root elementpublic StaticFunc[] funcs()
public java.lang.String toString()
toString
in class ExprInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |