javax.script
Interface ScriptEngineFactory

All Known Implementing Classes:
InteractivePhpScriptEngineFactory, InvocablePhpScriptEngineFactory, PhpScriptEngineFactory

public interface ScriptEngineFactory

ScriptEngineFactory is used to describe a ScriptEngine instance. Each ScriptEngine class implementing ScriptEngine has a corresponding factory which exposes metadata describing the engine class. Nandika Jayawardana Sanka Samaranayake


Method Summary
 java.lang.String getEngineName()
          Retrieves the full name of the ScriptEngine.
 java.lang.String getEngineVersion()
          Retrieves the version of the Script Engine.
 java.util.List getExtensions()
          Retrieves an array of Strings which are file extensions tipically used for files containing scripts written in the language supported by the ScriptEngine.
 java.lang.String getLanguageName()
          Retrieves the name of the language supported by the ScriptEngine.
 java.lang.String getLanguageVersion()
          Retrieves the version of the language supported by the ScriptEngine.
 java.lang.String getMethodCallSyntax(java.lang.String obj, java.lang.String m, java.lang.String[] args)
          Return a syntax string for method calls
 java.util.List getMimeTypes()
          Retrieves an array of Strings containing MIME types describing the content which can be processed using the Script Engine.
 java.util.List getNames()
          Retrieves an array of short descriptive names such as {"javascript", "rhino"} describing the language supported by the Script Engine.
 java.lang.String getOutputStatement(java.lang.String toDisplay)
          Return the output syntax
 java.lang.Object getParameter(java.lang.String key)
          Retrieves an associated value for the specified key.
 java.lang.String getProgram(java.lang.String[] statements)
          Return the program syntax
 ScriptEngine getScriptEngine()
          Retrieves an instance of the associated ScriptEngine.
 

Method Detail

getEngineName

java.lang.String getEngineName()
Retrieves the full name of the ScriptEngine.

Returns:
the name of the Script Engine

getEngineVersion

java.lang.String getEngineVersion()
Retrieves the version of the Script Engine.

Returns:
the version of the Script Engine

getLanguageName

java.lang.String getLanguageName()
Retrieves the name of the language supported by the ScriptEngine.

Returns:
the name of the supported language

getLanguageVersion

java.lang.String getLanguageVersion()
Retrieves the version of the language supported by the ScriptEngine.

Returns:
the version of the supported language

getExtensions

java.util.List getExtensions()
Retrieves an array of Strings which are file extensions tipically used for files containing scripts written in the language supported by the ScriptEngine.

Returns:
string array of supported file extensions

getMimeTypes

java.util.List getMimeTypes()
Retrieves an array of Strings containing MIME types describing the content which can be processed using the Script Engine.

Returns:
string array of MIME types

getNames

java.util.List getNames()
Retrieves an array of short descriptive names such as {"javascript", "rhino"} describing the language supported by the Script Engine.

Returns:
an array of short descriptive names describing the language supported by the ScriptEngine

getParameter

java.lang.Object getParameter(java.lang.String key)
Retrieves an associated value for the specified key. Returns null if the ScriptEngine does not have an associated value for the key.

Parameters:
key - The key
Returns:
associated value for the specified key

getScriptEngine

ScriptEngine getScriptEngine()
Retrieves an instance of the associated ScriptEngine.

Returns:
an instance of the associated ScriptEngine

getMethodCallSyntax

java.lang.String getMethodCallSyntax(java.lang.String obj,
                                     java.lang.String m,
                                     java.lang.String[] args)
Return a syntax string for method calls

Parameters:
obj - The call object
m - The methods
args - The arguments
Returns:
A syntax string

getOutputStatement

java.lang.String getOutputStatement(java.lang.String toDisplay)
Return the output syntax

Parameters:
toDisplay - The output string
Returns:
the output syntax

getProgram

java.lang.String getProgram(java.lang.String[] statements)
Return the program syntax

Parameters:
statements - The statement sequence
Returns:
The program syntax