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
Modifier and TypeFieldDescriptionstatic final ScriptHostFunctionResolver
A host function resolver with no functions or namespaces. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsNamespacedFunction
(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
null
namespace is valid, since it is a host call without declaring a namespace.Names must be resolved case-insensitively!
If this returns
true
for 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
null
namespace 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 returnfalse
if 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:
-