com.caucho.quercus.script
Class QuercusScriptEngineFactory

java.lang.Object
  extended by com.caucho.quercus.script.QuercusScriptEngineFactory
All Implemented Interfaces:
javax.script.ScriptEngineFactory

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

Script engine factory


Constructor Summary
QuercusScriptEngineFactory()
           
 
Method Summary
protected  QuercusContext createQuercus()
          Creates a new Quercus, which can be overridden for security issues.
 java.lang.String getEngineName()
          Returns the full name of the ScriptEngine.
 java.lang.String getEngineVersion()
          Returns the version of the ScriptEngine.
 java.util.List<java.lang.String> getExtensions()
          Returns an array of filename extensions normally used by this language.
 java.lang.String getLanguageName()
          Returns the name of the supported language.
 java.lang.String getLanguageVersion()
          Returns the version of the scripting language.
 java.lang.String getMethodCallSyntax(java.lang.String obj, java.lang.String m, java.lang.String[] args)
          Returns a string which could invoke a method of a Java object.
 java.util.List<java.lang.String> getMimeTypes()
          Returns the mime-types for scripts for the engine.
 java.util.List<java.lang.String> getNames()
          Returns the short names for the scripts for the engine, e.g.
 java.lang.String getOutputStatement(java.lang.String toDisplay)
          Returns a string which generates an output statement.
 java.lang.Object getParameter(java.lang.String key)
          Returns engine-specific properties.
 java.lang.String getProgram(java.lang.String[] statements)
          Returns a string which generates a valid program.
 javax.script.ScriptEngine getScriptEngine()
          Returns a ScriptEngine instance.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuercusScriptEngineFactory

public QuercusScriptEngineFactory()
Method Detail

getEngineName

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

Specified by:
getEngineName in interface javax.script.ScriptEngineFactory

getEngineVersion

public java.lang.String getEngineVersion()
Returns the version of the ScriptEngine.

Specified by:
getEngineVersion in interface javax.script.ScriptEngineFactory

getExtensions

public java.util.List<java.lang.String> getExtensions()
Returns an array of filename extensions normally used by this language.

Specified by:
getExtensions in interface javax.script.ScriptEngineFactory

getMimeTypes

public java.util.List<java.lang.String> getMimeTypes()
Returns the mime-types for scripts for the engine.

Specified by:
getMimeTypes in interface javax.script.ScriptEngineFactory

getNames

public java.util.List<java.lang.String> getNames()
Returns the short names for the scripts for the engine, e.g. {"javascript", "rhino"}

Specified by:
getNames in interface javax.script.ScriptEngineFactory

getLanguageName

public java.lang.String getLanguageName()
Returns the name of the supported language.

Specified by:
getLanguageName in interface javax.script.ScriptEngineFactory

getLanguageVersion

public java.lang.String getLanguageVersion()
Returns the version of the scripting language.

Specified by:
getLanguageVersion in interface javax.script.ScriptEngineFactory

getParameter

public java.lang.Object getParameter(java.lang.String key)
Returns engine-specific properties. Predefined keys include:

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)
Returns a string which could invoke a method of a Java object.

Specified by:
getMethodCallSyntax in interface javax.script.ScriptEngineFactory

getOutputStatement

public java.lang.String getOutputStatement(java.lang.String toDisplay)
Returns a string which generates an output statement.

Specified by:
getOutputStatement in interface javax.script.ScriptEngineFactory

getProgram

public java.lang.String getProgram(java.lang.String[] statements)
Returns a string which generates a valid program.

Specified by:
getProgram in interface javax.script.ScriptEngineFactory

getScriptEngine

public javax.script.ScriptEngine getScriptEngine()
Returns a ScriptEngine instance.

Specified by:
getScriptEngine in interface javax.script.ScriptEngineFactory

createQuercus

protected QuercusContext createQuercus()
Creates a new Quercus, which can be overridden for security issues.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object