Interface ScriptHostFunctionResolver
- All Known Implementing Classes:
CompoundHostFunctionResolver
public interface ScriptHostFunctionResolver
Resolver encapsulation for finding a relevant host function by name and namespace.
- Author:
- Matthew Tropiano
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScriptHostFunctionResolverA host function resolver with no functions or namespaces. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsNamespacedFunction(String namespace, String name) Attempts to find if this resolver has a function by its calling name and namespace.getNamespacedFunction(String namespace, String name) Attempts to resolve a pertinent function by its calling name.
-
Field Details
-
EMPTY
A host function resolver with no functions or namespaces.- Since:
- 1.8.0
-
-
Method Details
-
containsNamespacedFunction
Attempts to find if this resolver has a function by its calling name and namespace.A
nullnamespace is valid, since it is a host call without declaring a namespace.Names must be resolved case-insensitively!
If this returns
truefor a function name,getNamespacedFunction(String, String)must NOT return null if called with that name!- Parameters:
namespace- the function namespace (null is valid!).name- the name to find.- Returns:
- a corresponding function or null for no such function.
- See Also:
-
getNamespacedFunction
Attempts to resolve a pertinent function by its calling name.A
nullnamespace is valid, since it is a host call without declaring a namespace.Names must be resolved case-insensitively!
If this returns a non-null for a function name,
containsNamespacedFunction(String, String)must NOT returnfalseif called with that name!The same function must be returned if this is called again with the same name!
- Parameters:
namespace- the function namespace (null is valid!).name- the name to resolve.- Returns:
- a corresponding function or null for no such function.
- See Also:
-