javax.script
Class ScriptEngineManager

java.lang.Object
  extended by javax.script.ScriptEngineManager

public class ScriptEngineManager
extends java.lang.Object

A manager for script engines.


Field Summary
protected  java.util.HashSet engineSpis
           
protected  java.util.HashMap extensionAssociations
           
protected  Bindings globalScope
           
protected  java.util.HashMap mimeTypeAssociations
           
protected  java.util.HashMap nameAssociations
           
 
Constructor Summary
ScriptEngineManager()
          The constructor checks for implementations of the factory.
ScriptEngineManager(java.lang.ClassLoader loader)
          The constructor checks for implementations of the factory.
 
Method Summary
 java.lang.Object get(java.lang.String key)
          Gets a value in the global scope.
 Bindings getBindings()
          Gets the global scope bindings.
 ScriptEngine getEngineByExtension(java.lang.String ext)
          Returns the engine for the script factory by extension.
 ScriptEngine getEngineByMimeType(java.lang.String mimeType)
          Returns the engine for the script factory by mime-type.
 ScriptEngine getEngineByName(java.lang.String shortName)
          Returns the engine for the script factory by name.
 java.util.List<ScriptEngineFactory> getEngineFactories()
          Returns the known factories.
 void put(java.lang.String key, java.lang.Object value)
          Puts a value in the global scope.
 void registerEngineExtension(java.lang.String ext, java.lang.Class factory)
          Registers an engine extension
 void registerEngineMimeType(java.lang.String mimeType, java.lang.Class factory)
          Registers an engine mime-type.
 void registerEngineName(java.lang.String name, java.lang.Class factory)
          Registers an engine name.
 void setBindings(Bindings globalScope)
          Sets the global scope bindings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

engineSpis

protected java.util.HashSet engineSpis

extensionAssociations

protected java.util.HashMap extensionAssociations

globalScope

protected Bindings globalScope

mimeTypeAssociations

protected java.util.HashMap mimeTypeAssociations

nameAssociations

protected java.util.HashMap nameAssociations
Constructor Detail

ScriptEngineManager

public ScriptEngineManager()
The constructor checks for implementations of the factory.


ScriptEngineManager

public ScriptEngineManager(java.lang.ClassLoader loader)
The constructor checks for implementations of the factory.

Method Detail

setBindings

public void setBindings(Bindings globalScope)
Sets the global scope bindings.


getBindings

public Bindings getBindings()
Gets the global scope bindings.


put

public void put(java.lang.String key,
                java.lang.Object value)
Puts a value in the global scope.


get

public java.lang.Object get(java.lang.String key)
Gets a value in the global scope.


getEngineByName

public ScriptEngine getEngineByName(java.lang.String shortName)
Returns the engine for the script factory by name.


getEngineByExtension

public ScriptEngine getEngineByExtension(java.lang.String ext)
Returns the engine for the script factory by extension.


getEngineByMimeType

public ScriptEngine getEngineByMimeType(java.lang.String mimeType)
Returns the engine for the script factory by mime-type.


getEngineFactories

public java.util.List<ScriptEngineFactory> getEngineFactories()
Returns the known factories.


registerEngineName

public void registerEngineName(java.lang.String name,
                               java.lang.Class factory)
Registers an engine name.


registerEngineMimeType

public void registerEngineMimeType(java.lang.String mimeType,
                                   java.lang.Class factory)
Registers an engine mime-type.


registerEngineExtension

public void registerEngineExtension(java.lang.String ext,
                                    java.lang.Class factory)
Registers an engine extension