com.pdmfc.tea.engine
Class TeaScriptEngineFactory
java.lang.Object
com.pdmfc.tea.engine.TeaScriptEngineFactory
- All Implemented Interfaces:
- javax.script.ScriptEngineFactory
public class TeaScriptEngineFactory
- extends java.lang.Object
- implements javax.script.ScriptEngineFactory
|
Method Summary |
java.lang.String |
getEngineName()
|
java.lang.String |
getEngineVersion()
|
java.util.List<java.lang.String> |
getExtensions()
|
java.lang.String |
getLanguageName()
|
java.lang.String |
getLanguageVersion()
Up to Tea 3.2.1, there is no support to look up version in
runtime, so a "?" is returned. |
java.lang.String |
getMethodCallSyntax(java.lang.String objectName,
java.lang.String methodName,
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 message)
|
java.lang.Object |
getParameter(java.lang.String aKey)
|
java.lang.String |
getProgram(java.lang.String... statements)
|
javax.script.ScriptEngine |
getScriptEngine()
As we are not allowed to throw a ScriptException, real
initialization is delayed until you try to evaluate some Tea
code. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TeaScriptEngineFactory
public TeaScriptEngineFactory()
getEngineName
public java.lang.String getEngineName()
- Specified by:
getEngineName in interface javax.script.ScriptEngineFactory
- Returns:
- A string, "Tea Engine".
getEngineVersion
public java.lang.String getEngineVersion()
- Specified by:
getEngineVersion in interface javax.script.ScriptEngineFactory
- Returns:
- A string in the format "x.y.z". This value is not
related to the Tea version.
getExtensions
public java.util.List<java.lang.String> getExtensions()
- Specified by:
getExtensions in interface javax.script.ScriptEngineFactory
- Returns:
- A List with ("tea", "Tea", "Tea Engine").
getMimeTypes
public java.util.List<java.lang.String> getMimeTypes()
- Specified by:
getMimeTypes in interface javax.script.ScriptEngineFactory
- Returns:
- A List with ("application/x-tea").
getNames
public java.util.List<java.lang.String> getNames()
- Specified by:
getNames in interface javax.script.ScriptEngineFactory
- Returns:
- A List with ("tea").
getLanguageName
public java.lang.String getLanguageName()
- Specified by:
getLanguageName in interface javax.script.ScriptEngineFactory
- Returns:
- A string, "Tea".
getLanguageVersion
public java.lang.String getLanguageVersion()
- Up to Tea 3.2.1, there is no support to look up version in
runtime, so a "?" is returned.
- Specified by:
getLanguageVersion in interface javax.script.ScriptEngineFactory
getParameter
public java.lang.Object getParameter(java.lang.String aKey)
- Specified by:
getParameter in interface javax.script.ScriptEngineFactory
getMethodCallSyntax
public java.lang.String getMethodCallSyntax(java.lang.String objectName,
java.lang.String methodName,
java.lang.String... args)
- Specified by:
getMethodCallSyntax in interface javax.script.ScriptEngineFactory
getOutputStatement
public java.lang.String getOutputStatement(java.lang.String message)
- 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()
- As we are not allowed to throw a ScriptException, real
initialization is delayed until you try to evaluate some Tea
code.
- Specified by:
getScriptEngine in interface javax.script.ScriptEngineFactory
- See Also:
TeaCompiledScript.eval(ScriptContext scriptContext)
© 2007 PDM&FC, All Rights Reserved.