protected final void defaultPut(String name, Object value) { super.put(name, this, value); }
protected final void defaultPut(String name, Object value) { super.put(name, this, value); }
protected final void defaultPut(String name, Object value) { super.put(name, this, value); }
public void put(String name, Scriptable start, Object value) { if (KEY_CURRENT.equals(name) == false) { super.put(name, start, value); } }
/** Invoked after script execution */ void onExec() { this.useSession = false; super.put(LAST_EXEC_TIME, this, new Long(System.currentTimeMillis())); }
/** * Sets the specified configuration setting with the specified key. * * @param key The key to the configuration setting. * @param value The value of the configuration setting. */ public <T> void set(String key, T value) { Preconditions.checkArgument(key != null && !key.isEmpty(), "Parameter 'key' must not be [" + key + "]"); values.put(key, value); scope.put(key, scope, value); }
public void put(int index, Scriptable start, Object value) { if (scope == null) { super.put(index, start, value); } else { scope.put(this, index, value); } }
@Override public void put(String name, Scriptable start, Object value) { if (this == thePrototypeInstance) super.put(name, start, value); else System.getProperties().put(name, ScriptRuntime.toString(value)); }
public void put(String name, Scriptable start, Object value) { if (scope == null) { super.put(name, start, value); } else { scope.put(this, name, value); } }
@Override public void put(String name, Scriptable start, Object value) { if (this == thePrototypeInstance) super.put(name, start, value); else System.getProperties().put(name, ScriptRuntime.toString(value)); }
public void setAttribute(String name, Object attribute) { if (KEY_CURRENT.equals(name)) { if (attribute instanceof PageAttributeScope) { super.put(name, this, attribute); } return; } put(name, this, attribute); }
public Object run(Context cx) { Object o = object; if (name.equals(BIND_NAME_WINDOW) && object instanceof Window) { ((WindowWrapper) globalObject).window = (Window) object; window = (Window) object; o = globalObject; } Scriptable jsObject; jsObject = Context.toObject(o, globalObject); globalObject.put(name, globalObject, jsObject); return null; } });
public void setParameterValue( String name, String value ) { Object control = get( name, null ); if (control instanceof ScriptableObject) ((ScriptableObject) control).put( "value", this, value ); }
public void put( String propertyName, Scriptable scriptable, Object value ) { if (_scriptable == null || _scriptable.get( propertyName ) == null) { super.put( propertyName, scriptable, value ); } else { _scriptable.set( propertyName, value ); } }
private void updateVariableForObjectWithType(Object object, String objectType) { for (Variable var : this.profile.getVariablesByObject(objectType)) { if (var == null) { continue; } java.lang.Object variable = JavaScriptEvaluator.evalVariableResult(var, object, this.scope); this.scope.put(var.getName(), this.scope, variable); } }
private void updateVariableForObjectWithType(Object object, String objectType) { for (Variable var : this.profile.getVariablesByObject(objectType)) { if (var == null) { continue; } java.lang.Object variable = JavaScriptEvaluator.evalVariableResult(var, object, this.scope); this.scope.put(var.getName(), this.scope, variable); } }
public void put(int index, Scriptable start, Object value) { // FIXME(SW): do indexed properties have a meaning on the global scope? if (this.locked && !has(index, start)) { throw new WrappedException(new JavaScriptException("Global scope locked. Cannot set value for index " + index)); } this.useSession = true; super.put(index, start, value); }
public void put(String name, Scriptable start, Object value) { //Allow setting values to existing variables, or if this is a //java class (used by importClass & importPackage) if (this.locked && !has(name, start) && !(value instanceof NativeJavaClass) && !(value instanceof Function)) { // Need to wrap into a runtime exception as Scriptable.put has no throws clause... throw new WrappedException (new JavaScriptException("Implicit declaration of global variable '" + name + "' forbidden. Please ensure all variables are explicitely declared with the 'var' keyword")); } this.useSession = true; super.put(name, start, value); }
private void initializeAllVariables() { for (Variable var : this.profile.getVariables()) { if (var == null) continue; java.lang.Object res = JavaScriptEvaluator.evaluateString(var.getDefaultValue(), this.scope); if (res instanceof NativeJavaObject) { res = ((NativeJavaObject) res).unwrap(); } this.scope.put(var.getName(), this.scope, res); } }
private void initializeAllVariables() { for (Variable var : this.profile.getVariables()) { if (var == null) continue; java.lang.Object res = JavaScriptEvaluator.evaluateString(var.getDefaultValue(), this.scope); if (res instanceof NativeJavaObject) { res = ((NativeJavaObject) res).unwrap(); } this.scope.put(var.getName(), this.scope, res); } }