org.jopendocument.dom.template.engine
Class ScriptEngineDataModel
java.lang.Object
org.jopendocument.dom.template.engine.DataModel
org.jopendocument.dom.template.engine.ScriptEngineDataModel
public class ScriptEngineDataModel
- extends DataModel
A data model using a ScriptEngine.
- Author:
- Sylvain
|
Method Summary |
java.lang.Object |
_eval(java.lang.String script)
|
DataModel |
copy()
Copy this engine and especially its bindings. |
javax.script.ScriptEngine |
getEngine()
|
void |
put(java.lang.String key,
java.lang.Object value)
|
void |
putAll(java.util.Map<? extends java.lang.String,?> toMerge)
Copies all of the mappings from the specified map to this. |
| Methods inherited from class org.jopendocument.dom.template.engine.DataModel |
eval |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScriptEngineDataModel
public ScriptEngineDataModel(javax.script.ScriptEngine e)
getEngine
public final javax.script.ScriptEngine getEngine()
_eval
public java.lang.Object _eval(java.lang.String script)
throws javax.script.ScriptException
- Throws:
javax.script.ScriptException
put
public void put(java.lang.String key,
java.lang.Object value)
- Specified by:
put in class DataModel
putAll
public void putAll(java.util.Map<? extends java.lang.String,?> toMerge)
- Description copied from class:
DataModel
- Copies all of the mappings from the specified map to this. This implementation simply calls
put(k, v) once for each entry in the specified map.
- Overrides:
putAll in class DataModel
- Parameters:
toMerge - mappings to be stored.
copy
public DataModel copy()
- Description copied from class:
DataModel
- Copy this engine and especially its bindings.
- Specified by:
copy in class DataModel
- Returns:
- an independant copy of this.