|
||||||||||
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.StaticScope
org.basex.query.StaticDecl
org.basex.query.func.StaticFunc
public final class StaticFunc
A static user-defined function.
Field Summary | |
---|---|
Var[] |
args
Arguments. |
boolean |
updating
Updating flag. |
Fields inherited from class org.basex.query.StaticDecl |
---|
ann, declType, dontEnter, name, sc |
Fields inherited from class org.basex.query.StaticScope |
---|
compiled, expr, info, scope |
Constructor Summary | |
---|---|
StaticFunc(Ann a,
QNm n,
Var[] v,
SeqType r,
Expr e,
StaticContext stc,
VarScope scp,
java.lang.String xqdoc,
InputInfo ii)
Function constructor. |
Method Summary | |
---|---|
int |
arity()
Number of arguments this function takes. |
void |
checkUp()
Checks if all updating expressions in the function are correctly declared and placed. |
void |
compile(QueryContext ctx)
Compiles the expression contained in this scope. |
QNm |
fName()
Name of this function, null means anonymous function. |
FuncType |
funcType()
Type of this function. |
boolean |
has(Expr.Flag flag)
Indicates if an expression has the specified compiler property. |
byte[] |
id()
Returns a unique identifier for this declaration. |
Item |
invItem(QueryContext ctx,
InputInfo ii,
Value... arg)
Invokes this function with the given arguments. |
Value |
invValue(QueryContext ctx,
InputInfo ii,
Value... arg)
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. |
boolean |
selfRecursive()
Checks if this function calls itself recursively. |
java.lang.String |
toString()
|
boolean |
visit(ASTVisitor visitor)
Traverses this scope with the given ASTVisitor . |
Methods inherited from class org.basex.query.StaticDecl |
---|
type |
Methods inherited from class org.basex.query.StaticScope |
---|
compiled, doc |
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 |
Field Detail |
---|
public final Var[] args
public final boolean updating
Constructor Detail |
---|
public StaticFunc(Ann a, QNm n, Var[] v, SeqType r, Expr e, StaticContext stc, VarScope scp, java.lang.String xqdoc, InputInfo ii)
a
- annotationsn
- function namev
- argumentsr
- return typee
- function bodystc
- static contextscp
- variable scopexqdoc
- current xqdoc cacheii
- input infoMethod Detail |
---|
public void compile(QueryContext ctx) throws QueryException
Scope
compile
in interface Scope
ctx
- query context
QueryException
- compilation errorspublic void plan(FElem plan)
ExprInfo
plan
in class ExprInfo
plan
- root elementpublic java.lang.String toString()
toString
in class ExprInfo
public boolean selfRecursive()
public int arity()
XQFunction
arity
in interface XQFunction
public QNm fName()
XQFunction
null
means anonymous function.
fName
in interface XQFunction
null
public FuncType funcType()
XQFunction
funcType
in interface XQFunction
public Item invItem(QueryContext ctx, InputInfo ii, Value... arg) throws QueryException
XQFunction
invItem
in interface XQFunction
ctx
- query contextii
- input infoarg
- arguments
QueryException
- query exceptionpublic Value invValue(QueryContext ctx, InputInfo ii, Value... arg) throws QueryException
XQFunction
invValue
in interface XQFunction
ctx
- query contextii
- input infoarg
- arguments
QueryException
- query exceptionpublic void checkUp() throws QueryException
QueryException
- query exceptionpublic boolean isVacuous()
Expr.isVacuous()
).
public boolean has(Expr.Flag flag)
flag
- feature
Expr.has(Flag)
public boolean visit(ASTVisitor visitor)
Scope
ASTVisitor
.
visit
in interface Scope
visitor
- visitor
public byte[] id()
StaticDecl
id
in class StaticDecl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |