org.mozilla.javascript.engine

## Class RhinoScriptEngineFactory

- java.lang.Object
- - org.mozilla.javascript.engine.RhinoScriptEngineFactory

- All Implemented Interfaces:
    javax.script.ScriptEngineFactory

      public class RhinoScriptEngineFactory
      extends java.lang.Object
      implements javax.script.ScriptEngineFactory

  This is an implementation of the standard Java "ScriptEngine" for Rhino. If the Rhino engine (typically in the form of the "rhino-engine" JAR) is in the classpath, then this script engine will be activated.

  See the list of constants in this class for the list of language names, file extensions, and MIME types that this engine supports. This list is essentially the same as the list supported in the Nashorn script engine that was included in Java 8.

  Since this engine and Nashorn support the same language and file extensions, then unless you are sure you are running in an environment that has Nashorn, the best way to get this engine is to call ScriptEngine.getEngineByName("rhino") to ask for Rhino directly.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RhinoScriptEngineFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getEngineName()`
    `java.lang.String` | `getEngineVersion()`
    `java.util.List<java.lang.String>` | `getExtensions()`
    `java.lang.String` | `getLanguageName()`
    `java.lang.String` | `getLanguageVersion()`
    `java.lang.String` | `getMethodCallSyntax(java.lang.String obj, java.lang.String m, java.lang.String... args)`
    `java.util.List<java.lang.String>` | `getMimeTypes()`
    `java.util.List<java.lang.String>` | `getNames()`
    `java.lang.String` | `getOutputStatement(java.lang.String toDisplay)`
    `java.lang.Object` | `getParameter(java.lang.String key)`
    `java.lang.String` | `getProgram(java.lang.String... statements)`
    `javax.script.ScriptEngine` | `getScriptEngine()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NAME

          public static final java.lang.String NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RhinoScriptEngineFactory

          public RhinoScriptEngineFactory()

  - ### Method Detail

    - #### getEngineName

          public java.lang.String getEngineName()

      Specified by:
        `getEngineName` in interface `javax.script.ScriptEngineFactory`

    - #### getEngineVersion

          public java.lang.String getEngineVersion()

      Specified by:
        `getEngineVersion` in interface `javax.script.ScriptEngineFactory`

    - #### getExtensions

          public java.util.List<java.lang.String> getExtensions()

      Specified by:
        `getExtensions` in interface `javax.script.ScriptEngineFactory`

    - #### getMimeTypes

          public java.util.List<java.lang.String> getMimeTypes()

      Specified by:
        `getMimeTypes` in interface `javax.script.ScriptEngineFactory`

    - #### getNames

          public java.util.List<java.lang.String> getNames()

      Specified by:
        `getNames` in interface `javax.script.ScriptEngineFactory`

    - #### getLanguageName

          public java.lang.String getLanguageName()

      Specified by:
        `getLanguageName` in interface `javax.script.ScriptEngineFactory`

    - #### getLanguageVersion

          public java.lang.String getLanguageVersion()

      Specified by:
        `getLanguageVersion` in interface `javax.script.ScriptEngineFactory`

    - #### getParameter

          public java.lang.Object getParameter(java.lang.String key)

      Specified by:
        `getParameter` in interface `javax.script.ScriptEngineFactory`

    - #### getMethodCallSyntax

          public java.lang.String getMethodCallSyntax(java.lang.String obj,
                                                      java.lang.String m,
                                                      java.lang.String... args)

      Specified by:
        `getMethodCallSyntax` in interface `javax.script.ScriptEngineFactory`

    - #### getOutputStatement

          public java.lang.String getOutputStatement(java.lang.String toDisplay)

      Specified by:
        `getOutputStatement` in interface `javax.script.ScriptEngineFactory`

    - #### getProgram

          public java.lang.String getProgram(java.lang.String... statements)

      Specified by:
        `getProgram` in interface `javax.script.ScriptEngineFactory`

    - #### getScriptEngine

          public javax.script.ScriptEngine getScriptEngine()

      Specified by:
        `getScriptEngine` in interface `javax.script.ScriptEngineFactory`