|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
public abstract class SystemFunction
Abstract superclass for system-defined and user-defined functions
Field Summary |
---|
Fields inherited from class net.sf.saxon.expr.Expression |
---|
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
Constructor Summary | |
---|---|
SystemFunction()
|
Method Summary | |
---|---|
void |
checkArguments(StaticContext env)
Method called during static type checking |
int |
computeCardinality()
Determine the cardinality of the function. |
int |
computeSpecialProperties()
Determine the special properties of this expression. |
void |
display(int level,
PrintStream out,
Configuration config)
Diagnostic print of expression structure |
StandardFunction.Entry |
getDetails()
Get the details |
String |
getErrorCodeForTypeErrors()
Return the error code to be used for type errors. |
ItemType |
getItemType(TypeHierarchy th)
Determine the item type of the value returned by the function |
static void |
main(String[] args)
The main() method of this class is not intended to be called, it merely tells the code inspection tools in IDEA that the constructors of each function class are actual entry points |
static FunctionCall |
makeSystemFunction(String name,
int arity,
NamePool pool)
Make a system function (one in the standard function namespace). |
Expression |
optimize(Optimizer opt,
StaticContext env,
ItemType contextItemType)
Perform optimisation of an expression and its subexpressions. |
void |
setDetails(StandardFunction.Entry entry)
Set the details of this type of function |
Methods inherited from class net.sf.saxon.expr.FunctionCall |
---|
getArguments, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionNameCode, simplify, typeCheck |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemFunction()
Method Detail |
---|
public static FunctionCall makeSystemFunction(String name, int arity, NamePool pool)
name
- The local name of the function. It may also be a lexical QName for
a recognized built-in function, e.g. saxon:evaluate, in which case the prefix is hard-coded.
public void setDetails(StandardFunction.Entry entry)
public StandardFunction.Entry getDetails()
public void checkArguments(StaticContext env) throws XPathException
XPathException
public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType) throws XPathException
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.
optimize
in class FunctionCall
opt
- the optimizer in use. This provides access to supporting functions; it also allows
different optimization strategies to be used in different circumstances.env
- the static context of the expressioncontextItemType
- the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPE
StaticError
- if an error is discovered during this phase
(typically a type error)
XPathException
public String getErrorCodeForTypeErrors()
public ItemType getItemType(TypeHierarchy th)
getItemType
in class Expression
th
-
public int computeCardinality()
public int computeSpecialProperties()
computeSpecialProperties
in class Expression
public void display(int level, PrintStream out, Configuration config)
display
in class FunctionCall
level
- indentation level for this expressionout
- Output destinationpublic static void main(String[] args) throws Exception
Exception
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |