net.sf.saxon.query
Class XQueryFunction

java.lang.Object
  |
  +--net.sf.saxon.query.XQueryFunction
All Implemented Interfaces:
FunctionSignature

public class XQueryFunction
extends java.lang.Object
implements FunctionSignature


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
 

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
XPathException

fixupReferences

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

XPathException

allocateSlots

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


explain

public void explain(NamePool pool)