AbstractScript
Abstract base class for script execution that supports named variable bindings with type parameters.
Manages a map of named values and their associated type parameters, generates parameter declarations for the target language, and handles context resets between evaluations.
Subclasses call prepare at the start of every evaluation, which checks the code and binds the variables added since the last evaluation. Variables can therefore be added at any time. Adding variables, resetting, and evaluating are synchronized on the instance.
Parameters
the file extension used to look up the script engine (e.g., "kts", "py", "java")
if true, sets the global scope bindings to null on initialization
Functions
Resets the script engine context, clearing all variable and type mappings.
Prepares this instance for its next user by resetting the context and any other per-user state. AbstractScriptPool calls it when an instance is returned to the pool; subclasses that hold more state, such as imports, extend it.