Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.saxonica.config
Class JavaExtensionFunctionFactory

    java.lang.Object
      com.saxonica.config.JavaExtensionFunctionFactory

All Implemented Interfaces:
  Serializable, ExtensionFunctionFactory

    public class JavaExtensionFunctionFactory

extends Object
implements ExtensionFunctionFactory, Serializable

This class acts as a factory for creating expressions that call Java extension functions. A different factory may be registered with the Configuration in order to customize the behaviour. Alternatively, this factory class can be customized by calling setExtensionFunctionClass to nominate a subclass of ExtensionFunctionCall to be used to implement calls on extension functions.

Note that this class handles Java extension functions only; a different class, DotNetExtensionFunctionFactory, is used for .NET extensions.

See Also:
  Serialized Form

Constructor Summary
`JavaExtensionFunctionFactory(Configuration config)`

Method Summary
`Expression` | `makeExtensionFunctionCall(StructuredQName functionName, Class theClass, AccessibleObject method, Expression[] arguments)` Factory method to create an expression that calls a Java extension function.
`void` | `setExtensionFunctionClass(Class subclass)` Set the class to be used to represent extension function calls.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JavaExtensionFunctionFactory

    public JavaExtensionFunctionFactory(Configuration config)

Method Detail

### setExtensionFunctionClass

    public void setExtensionFunctionClass(Class subclass)

  Set the class to be used to represent extension function calls. This must be a subclass of `JavaExtensionFunctionCall`

  Parameters:
    `subclass` - the subclass of ExtensionFunctionCall to be used

### makeExtensionFunctionCall

    public Expression makeExtensionFunctionCall(StructuredQName functionName,
                                                Class theClass,
                                                AccessibleObject method,
                                                Expression[] arguments)

  Factory method to create an expression that calls a Java extension function. This is always called at XPath compile time.

  Parameters:
    `functionName` - the name of the function
    `theClass` - the Java class containing the extension function
    `method` - The "accessibleObject" representing a constructor, method, or field corresponding to the extension function
    `arguments` - Array containing the expressions supplied as arguments to the function call.
  Returns:
    the constructed ExtensionFunctionCall object (a subclass might return any expression representing the extension function call).

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.