public interface ScriptEngineFactory
ScriptEngineFactory
is used to describe and instantiate
ScriptEngines
. ScriptEngine
has a corresponding factory that
exposes metadata describing the engine class. ScriptEngineManager
uses the service provider mechanism described
in the Jar File Specification to obtain instances of all
ScriptEngineFactories
available in the current ClassLoader.Modifier and Type | Method and Description |
---|---|
String |
getEngineName()
Returns the full name of the
ScriptEngine . |
String |
getEngineVersion()
Returns the version of the
ScriptEngine . |
List<String> |
getExtensions()
Returns an immutable list of filename extensions, which generally
identify scripts written in the language supported by this
ScriptEngine . |
String |
getLanguageName()
Returns the name of the scripting langauge supported by this
ScriptEngine . |
String |
getLanguageVersion()
Returns the version of the scripting language supported by this
ScriptEngine . |
List<String> |
getMimeTypes()
Returns an immutable list of mimetypes, associated with scripts that can
be executed by the engine.
|
List<String> |
getNames()
Returns an immutable list of short names for the
ScriptEngine ,
which may be used to identify the ScriptEngine by the
ScriptEngineManager . |
ScriptEngine |
getScriptEngine(Map<String,Object> configuration,
Collection<SourceContainer> sourceContainers,
ClassLoader registryLevelClassLoader)
Returns an instance of the
ScriptEngine associated with this
ScriptEngineFactory . |
String getEngineName()
ScriptEngine
. For instance an
implementation based on the Mozilla Rhino Javascript engine might return
Rhino Mozilla Javascript Engine.String getEngineVersion()
ScriptEngine
.ScriptEngine
implementation version.List<String> getExtensions()
ScriptEngine
. The array is used by the
ScriptEngineManager
to implement its getEngineByExtension
method.List<String> getMimeTypes()
ScriptEngineManager
class to implement its
getEngineByMimetype
method.List<String> getNames()
ScriptEngine
,
which may be used to identify the ScriptEngine
by the
ScriptEngineManager
. For instance, an implementation based on the
Mozilla Rhino Javascript engine might return list containing
{"javascript", "rhino"}.String getLanguageName()
ScriptEngine
.String getLanguageVersion()
ScriptEngine
.ScriptEngine getScriptEngine(Map<String,Object> configuration, Collection<SourceContainer> sourceContainers, ClassLoader registryLevelClassLoader)
ScriptEngine
associated with this
ScriptEngineFactory
. A new ScriptEngine is generally returned,
but implementations may pool, share or reuse engines.configuration
- script engine configurationsourceContainers
- a collection of SourceContainers used to locate scriptsregistryLevelClassLoader
- the ScriptRegistry's class loaderScriptEngine
instance.Copyright © 2025 Open Identity Platform Community. All rights reserved.