|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.script.ScriptEngineManager
public class ScriptEngineManager
ScriptEngineManager implements a discovery and instantiation
mechanisams for ScriptEngine class. It also contains a collection
of key-value pairs which storing state shared by all engines
created by manager.
Nandika Jayawardana
Constructor Summary | |
---|---|
ScriptEngineManager()
Constructs ScriptEngineManager and initializes it. |
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.String key)
Retrieves the associated value for the spefied key in the GLOBAL_SCOPE |
Bindings |
getBindings()
Retrieves the namespace corresponds to GLOBAL_SCOPE. |
ScriptEngine |
getEngineByExtension(java.lang.String extension)
Retrieves a new instance of a ScriptingEngine for the specified extension of a scirpt file. |
ScriptEngine |
getEngineByMimeType(java.lang.String mimeType)
Retrieves new instance the ScriptingEngine for a specifed MIME type. |
ScriptEngine |
getEngineByName(java.lang.String name)
Retrieves a new instance of a ScriptEngine the specified descriptieve name. |
java.util.List |
getEngineFactories()
Retrieves an array of instances of ScriptEngineFactory class which are found by the discovery mechanism. |
void |
put(java.lang.String key,
java.lang.Object value)
Associates the specifed value with the specified key in GLOBAL_SCOPE. |
void |
registerEngineExtension(java.lang.String extension,
java.lang.Class factory)
Register a extension with a ScriptEngineFactory class. |
void |
registerEngineMimeType(java.lang.String mimeType,
java.lang.Class factory)
Registers a MIME type with a ScriptEngineFactory class. |
void |
registerEngineName(java.lang.String name,
java.lang.Class factory)
Registers descriptive name with a ScriptEngineFactory class. |
void |
setBindings(Bindings namespace)
Sets the GLOBAL_SCOPE value to the specified namespace. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptEngineManager()
Method Detail |
---|
public java.lang.Object get(java.lang.String key)
key
- the associated key of the value stored in the
GLOBAL_SCOPE
public ScriptEngine getEngineByExtension(java.lang.String extension)
extension
- the specified extension of a script file
public ScriptEngine getEngineByMimeType(java.lang.String mimeType)
mimeType
- the specified MIME type
public ScriptEngine getEngineByName(java.lang.String name)
name
- the descriptive name
public java.util.List getEngineFactories()
public Bindings getBindings()
public void put(java.lang.String key, java.lang.Object value)
key
- the associated key for specified valuevalue
- the associated value for the specified keypublic void registerEngineExtension(java.lang.String extension, java.lang.Class factory)
extension
- the extension associated with the specified
ScriptEngineFactory classfactory
- the ScriptEngineFactory class associated with
the specified extensionpublic void registerEngineName(java.lang.String name, java.lang.Class factory)
name
- a descriptive name associated with the specifed
ScriptEngineFactory classfactory
- the ScriptEngineFactory class associated with
the specified descriptive namepublic void registerEngineMimeType(java.lang.String mimeType, java.lang.Class factory)
mimeType
- the MIME type associated with specified
ScriptEngineFactory classfactory
- the ScriptEngineFactory associated with the
specified MIME typepublic void setBindings(Bindings namespace)
namespace
- the namespace to be stored in GLOBAL_SCOPE
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |