org.shapelogic.scripting
Class ScriptEngineCache

java.lang.Object
  extended by org.shapelogic.scripting.ScriptEngineCache

public class ScriptEngineCache
extends java.lang.Object

ScriptEngineFactory get ScriptEngine by name.
Create script and evaluate.

Author:
Sami Badawi

Field Summary
static boolean GET_ENGINE_BY_EXTENSION
           
 
Constructor Summary
ScriptEngineCache()
           
 
Method Summary
static java.lang.Object eval(java.lang.String script, java.lang.String language)
           
static javax.script.ScriptEngine getNewScriptEngineByName(java.lang.String language)
          I should also create one for extension
static javax.script.ScriptEngine getScriptEngineByExtension(java.lang.String extension)
          I should also create one for extension
static javax.script.ScriptEngine getScriptEngineByName(java.lang.String language)
          I should also create one for extension
static javax.script.ScriptEngineManager getScriptEngineManager()
           
static void put(java.lang.String key, java.lang.Object value, java.lang.String language)
           
static javax.script.ScriptEngine script(java.lang.String script, java.lang.String language)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET_ENGINE_BY_EXTENSION

public static final boolean GET_ENGINE_BY_EXTENSION
See Also:
Constant Field Values
Constructor Detail

ScriptEngineCache

public ScriptEngineCache()
Method Detail

getScriptEngineManager

public static javax.script.ScriptEngineManager getScriptEngineManager()

getScriptEngineByName

public static javax.script.ScriptEngine getScriptEngineByName(java.lang.String language)
I should also create one for extension


getNewScriptEngineByName

public static javax.script.ScriptEngine getNewScriptEngineByName(java.lang.String language)
I should also create one for extension


getScriptEngineByExtension

public static javax.script.ScriptEngine getScriptEngineByExtension(java.lang.String extension)
I should also create one for extension


eval

public static java.lang.Object eval(java.lang.String script,
                                    java.lang.String language)
                             throws java.lang.Exception
Throws:
java.lang.Exception

script

public static javax.script.ScriptEngine script(java.lang.String script,
                                               java.lang.String language)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

put

public static void put(java.lang.String key,
                       java.lang.Object value,
                       java.lang.String language)
                throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2008. All Rights Reserved.