net.sf.saxon.query
Class XQueryFunction

java.lang.Object
  extended by net.sf.saxon.query.XQueryFunction
All Implemented Interfaces:
FunctionSignature

public class XQueryFunction
extends Object
implements FunctionSignature


Field Summary
(package private)  List arguments
           
(package private)  Expression body
           
(package private)  UserFunction compiledFunction
           
(package private)  String displayName
           
(package private)  int fingerprint
           
(package private)  int lineNumber
           
(package private)  List references
           
(package private)  SequenceType resultType
           
 
Constructor Summary
XQueryFunction()
           
 
Method Summary
protected static int allocateSlots(Expression exp, int nextFree)
          Allocate slot numbers to range variables
 UserFunction compile(StaticQueryContext env)
           
 void explain(NamePool pool)
           
 void fixupReferences()
          Fix up references to this function
 SequenceType[] getArgumentTypes()
          Get the required types of the arguments to this function, as an array
 int getFunctionFingerprint()
          Get the name of the function, as a namepool fingerprint
 int getNumberOfArguments()
          Get the number of arguments (the arity) of the function
 SequenceType getResultType()
          Get the type of value returned by this function
 void registerReference(UserFunctionCall ufc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fingerprint

int fingerprint

displayName

String displayName

arguments

List arguments

resultType

SequenceType resultType

body

Expression body

references

List references

lineNumber

int lineNumber

compiledFunction

UserFunction compiledFunction
Constructor Detail

XQueryFunction

public XQueryFunction()
Method Detail

getFunctionFingerprint

public int getFunctionFingerprint()
Description copied from interface: FunctionSignature
Get the name of the function, as a namepool fingerprint

Specified by:
getFunctionFingerprint in interface FunctionSignature
Returns:
the fingerprint of the function name

getResultType

public SequenceType getResultType()
Description copied from interface: FunctionSignature
Get the type of value returned by this function

Specified by:
getResultType in interface FunctionSignature
Returns:
the declared result type, or the inferred result type if this is more precise

getArgumentTypes

public SequenceType[] getArgumentTypes()
Description copied from interface: FunctionSignature
Get the required types of the arguments to this function, as an array

Specified by:
getArgumentTypes in interface FunctionSignature
Returns:
an array of SequenceType objects, one for each formal argument, indicating the required type of the argument

getNumberOfArguments

public int getNumberOfArguments()
Description copied from interface: FunctionSignature
Get the number of arguments (the arity) of the function

Specified by:
getNumberOfArguments in interface FunctionSignature
Returns:
the function's arity

registerReference

public void registerReference(UserFunctionCall ufc)

compile

public UserFunction compile(StaticQueryContext env)
                     throws XPathException
Throws:
XPathException

fixupReferences

public void fixupReferences()
                     throws XPathException
Fix up references to this function

Throws:
XPathException

allocateSlots

protected static int allocateSlots(Expression exp,
                                   int nextFree)
Allocate slot numbers to range variables


explain

public void explain(NamePool pool)