
Looks up and creates a
ScriptEngine for a given name.
The algorithm first searches for a
ScriptEngineFactory that has been
registered as a handler for the specified name using the
registerEngineName method.
If one is not found, it searches the array of
ScriptEngineFactory instances
stored by the constructor for one with the specified name. If a
ScriptEngineFactory is found by either method, it is used to create instance of
ScriptEngine.
Returns:
A
ScriptEngine created by the factory located in the search. Returns null
if no such factory was found. The
ScriptEngineManager sets its own
globalScope
Bindings as the
GLOBAL_SCOPE Bindings of the newly
created
ScriptEngine.
Parameters:
-
shortName - The short name of the
ScriptEngine implementation.
returned by the
getNames method of its
ScriptEngineFactory.
Throws:
-
NullPointerException - if shortName is null.