public class RhinoScriptScope extends Object implements IScriptScope
| Constructor and Description |
|---|
RhinoScriptScope(org.mozilla.javascript.ScriptableObject val) |
RhinoScriptScope(org.mozilla.javascript.ScriptableObject val,
boolean writable) |
| Modifier and Type | Method and Description |
|---|---|
IScriptScope |
addObjectProperty(String name)
Create a new object property inside this one, with the specified name.
|
<T> T |
eval(Class<T> targetType,
Reader r,
String sourceFileNameIndicator) |
<T> T |
eval(Class<T> targetType,
String expression,
String sourceFileNameIndicator) |
<T> T |
getAdapter(Class<T> clz) |
<T> List<T> |
getProperties(Class<T> filterClass)
Get all properties of this object.
|
<T> T |
getValue(Class<T> targetType,
String name)
Return the value for the specified variable in this scope.
|
RhinoScriptScope |
newScope()
Create a new writable scope that has this scope as the "delegate".
|
void |
put(String name,
Object instance)
Put a simple value inside the scope.
|
Object |
toObject(Object o) |
protected <T> T |
translateValue(Class<T> targetClass,
Object val) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddObjectProperty, eval, eval, getAdapter, getProperties, getValue, newScope, putpublic RhinoScriptScope(@Nonnull org.mozilla.javascript.ScriptableObject val, boolean writable)
public RhinoScriptScope(@Nonnull org.mozilla.javascript.ScriptableObject val)
public void put(@Nonnull String name, @Nullable Object instance)
IScriptScopeput in interface IScriptScope@Nonnull public RhinoScriptScope newScope()
IScriptScopenewScope in interface IScriptScope@Nullable public <T> T getValue(@Nonnull Class<T> targetType, @Nonnull String name)
IScriptScopegetValue in interface IScriptScopeto.etc.domui.util.js.IScriptScope#getValue(java.lang.String)@Nullable public <T> T getAdapter(@Nonnull Class<T> clz)
getAdapter in interface IScriptScope@Nonnull public <T> List<T> getProperties(@Nonnull Class<T> filterClass)
IScriptScopegetProperties in interface IScriptScope@Nullable public <T> T eval(@Nonnull Class<T> targetType, @Nonnull Reader r, @Nonnull String sourceFileNameIndicator) throws Exception
eval in interface IScriptScopeExceptionpublic <T> T eval(@Nonnull Class<T> targetType, @Nonnull String expression, @Nonnull String sourceFileNameIndicator) throws Exception
eval in interface IScriptScopeException@Nonnull public IScriptScope addObjectProperty(@Nonnull String name)
IScriptScopeaddObjectProperty in interface IScriptScopeCopyright © 2017 etc.to. All rights reserved.