com.saxonica.hof
Class InlineFunctionWithExternals

java.lang.Object
  extended by com.saxonica.hof.AbstractFunctionItem
      extended by com.saxonica.hof.UserFunctionItem
          extended by com.saxonica.hof.InlineFunctionWithExternals
All Implemented Interfaces:
Serializable, PullEvent, FunctionItem, Item, ValueRepresentation

public class InlineFunctionWithExternals
extends UserFunctionItem

A function written as an inline anonymous function, that has one or more references to local variables declared outside the body of the function

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.saxonica.hof.UserFunctionItem
target
 
Fields inherited from interface net.sf.saxon.om.ValueRepresentation
EMPTY_VALUE_ARRAY
 
Constructor Summary
InlineFunctionWithExternals(UserFunctionCall target)
          Create the function
 
Method Summary
 void addExternalVariableMapping(Binding oldSlot, int newSlot)
          Add a mapping from the outer stackframe to the new stackframe
 ValueRepresentation invoke(ValueRepresentation[] args, XPathContext context)
          Invoke the function
 
Methods inherited from class com.saxonica.hof.UserFunctionItem
explain, getArity, getFunctionItemType, getFunctionName, typeCheck
 
Methods inherited from class com.saxonica.hof.AbstractFunctionItem
bind, curry, getStringValue, getStringValueCS, getTypedValue, optimize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineFunctionWithExternals

public InlineFunctionWithExternals(UserFunctionCall target)
Create the function

Parameters:
target - the function to be curried
Method Detail

addExternalVariableMapping

public void addExternalVariableMapping(Binding oldSlot,
                                       int newSlot)
Add a mapping from the outer stackframe to the new stackframe


invoke

public ValueRepresentation invoke(ValueRepresentation[] args,
                                  XPathContext context)
                           throws XPathException
Invoke the function

Specified by:
invoke in interface FunctionItem
Overrides:
invoke in class UserFunctionItem
Parameters:
args - the actual arguments to be supplied
context - the XPath dynamic evaluation context
Returns:
the result of invoking the function
Throws:
XPathException


Copyright (c) Saxonica Limited. All rights reserved.