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 Details

  • Method Details

    • containsNamespacedFunction

      boolean containsNamespacedFunction(String namespace, String name)
      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

      ScriptFunctionType getNamespacedFunction(String namespace, String name)
      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 return false 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: