| 1 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 2 | // Copyright (c) 2018 Saxonica Limited. |
| 3 | // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. |
| 4 | // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 | // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. |
| 6 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 7 | |
| 8 | package net.sf.saxon.query; |
| 9 | |
| 10 | import net.sf.saxon.functions.FunctionLibrary; |
| 11 | import net.sf.saxon.om.StructuredQName; |
| 12 | |
| 13 | /** |
| 14 | * XQueryFunctionBinder is an extension of the FunctionLibrary interface used for function libraries |
| 15 | * that contain user-written XQuery functions. It provides a method that allows the XQueryFunction |
| 16 | * with a given name and arity to be located. |
| 17 | */ |
| 18 | |
| 19 | public interface XQueryFunctionBinder extends FunctionLibrary { |
| 20 | |
| 21 | /** |
| 22 | * Get the function declaration corresponding to a given function name and arity |
| 23 | * |
| 24 | * @param functionName the name of the function as a QName |
| 25 | * @param staticArgs the number of expressions supplied as arguments in the function call |
| 26 | * @return the XQueryFunction if there is one, or null if not. |
| 27 | */ |
| 28 | |
| 29 | /*@Nullable*/ |
| 30 | XQueryFunction getDeclaration(StructuredQName functionName, int staticArgs); |
| 31 | |
| 32 | } |