Interface ScriptFunctionResolver
- All Known Implementing Classes:
ClassMemberFunctionResolver
,CompoundFunctionResolver
,EnumFunctionResolver
public interface ScriptFunctionResolver
Resolver encapsulation for finding a relevant host function by name.
- Author:
- Matthew Tropiano
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ScriptFunctionResolver
A function resolver with no functions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsFunction
(String name) Attempts to find if this resolver has a function by its calling name.getFunction
(String name) Attempts to resolve a pertinent function by its calling name.Gets the full list of all script functions.
-
Field Details
-
EMPTY
A function resolver with no functions.- Since:
- 1.8.0
-
-
Method Details
-
containsFunction
Attempts to find if this resolver has a function by its calling name.Names must be resolved case-insensitively!
If this returns
true
for a function name,getFunction(String)
must NOT return null if called with that name!- Parameters:
name
- the name to find.- Returns:
- a corresponding function or null for no such function.
-
getFunction
Attempts to resolve a pertinent function by its calling name.Names must be resolved case-insensitively!
If this returns a non-null for a function name,
containsFunction(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:
name
- the name to resolve.- Returns:
- a corresponding function or null for no such function.
- See Also:
-
getFunctions
ScriptFunctionType[] getFunctions()Gets the full list of all script functions. Depending on the implementation, this may be an expensive lookup.- Returns:
- a list of all functions.
-