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 Details

  • Method Details

    • containsFunction

      boolean containsFunction(String name)
      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

      ScriptFunctionType getFunction(String name)
      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 return false 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.