1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package gov.nist.secauto.metaschema.core.metapath.function;
7
8 import gov.nist.secauto.metaschema.core.metapath.StaticMetapathException;
9 import gov.nist.secauto.metaschema.core.qname.IEnhancedQName;
10
11 import edu.umd.cs.findbugs.annotations.NonNull;
12
13 /**
14 * Resolves Metapath function signatures based on name and arity.
15 */
16 @FunctionalInterface
17 public interface IFunctionResolver {
18 /**
19 * Retrieve the function with the provided name that supports the signature of
20 * the provided methods.
21 *
22 * @param name
23 * the name of a group of functions
24 * @param arity
25 * the count of arguments for use in determining an argument signature
26 * match
27 * @return the matching function
28 * @throws StaticMetapathException
29 * with the code {@link StaticMetapathException#NO_FUNCTION_MATCH} if
30 * a matching function was not found
31 */
32 @NonNull
33 IFunction getFunction(@NonNull IEnhancedQName name, int arity);
34 }