| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.expr.FunctionCall net.sf.saxon.functions.ExtensionFunctionCall
ExtensionFunctionCall | public class ExtensionFunctionCall extends FunctionCall (Code) | | This class acts as a container for an extension function defined to call a method
in a user-defined class.
Note that the binding of an XPath function call to a Java method is done in
class
JavaExtensionLibrary
|
ExtensionFunctionCall | public ExtensionFunctionCall()(Code) | | Default constructor
|
computeCardinality | public int computeCardinality()(Code) | | |
getField | protected Object getField(Field field, Object instance) throws java.lang.IllegalAccessException(Code) | | Access a field. This method is provided separately so that it can be refined in a subclass.
For example, a subclass might perform tracing of calls, or might trap exceptions.
Parameters: field - The field to be retrieved Parameters: instance - The object whose field is to be retrieved. This is set to null if thefield is static. The value of the field throws: IllegalAccessException - if the invocation throws an IllegalAccessException |
getIntrinsicDependencies | public int getIntrinsicDependencies()(Code) | | Determine which aspects of the context the expression depends on. The result is
a bitwise-or'ed value composed from constants such as XPathContext.VARIABLES and
XPathContext.CURRENT_NODE
|
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Determine the data type of the expression, if possible. All expressions return
sequences, in general; this method determines the type of the items within the
sequence, assuming that (a) this is known in advance, and (b) it is the same for
all items in the sequence.
This method will always return a result, though it may be the best approximation
that is available at the time.
the item type Parameters: th - |
getTargetClass | public Class getTargetClass()(Code) | | Get the class containing the method being called
|
getTargetMethod | public AccessibleObject getTargetMethod()(Code) | | Get the target method (or field, or constructor) being called
|
init | public void init(int nameCode, Class theClass, AccessibleObject object, Configuration config)(Code) | | Initialization: creates an ExtensionFunctionCall
Parameters: nameCode - the name code of the function, for display purposes Parameters: theClass - the Java class containing the method to be called Parameters: object - the method, field, or constructor of the Java class to be called |
invokeMethod | protected Object invokeMethod(Method method, Object instance, Object[] params) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException(Code) | | Invoke a method. This method is provided separately so that it can be refined in a subclass.
For example, a subclass might perform tracing of calls, or might trap exceptions.
Parameters: method - The method to be invoked Parameters: instance - The object on which the method is to be invoked. This is set to null if themethod is static. Parameters: params - The parameters to be passed to the method The object returned by the method throws: IllegalAccessException - if the invocation throws an IllegalAccessException throws: InvocationTargetException - if the invocation throws an InvocationTargetException (which happenswhen the method itself throws an exception) |
preEvaluate | public Expression preEvaluate(StaticContext env)(Code) | | preEvaluate: this method suppresses compile-time evaluation by doing nothing
(because the external function might have side-effects and might use the context)
|
usesFocus | public boolean usesFocus()(Code) | | Determine whether this method uses the focus. True if the first argument is of type XPathContext.
|
|
|