assert name != null;
assert accessor != null;
assert name.startsWith("$");
synchronized (ctx) {
Bindings engineScope = ctx.getBindings(ScriptContext.ENGINE_SCOPE);
engineScope.put(name, new GlobalVariable(accessor));
}
}
public void defineReadonly(String name, IAccessor accessor) {
assert name != null;
assert accessor != null;
assert name.startsWith("$");
synchronized (ctx) {
Bindings engineScope = ctx.getBindings(ScriptContext.ENGINE_SCOPE);
engineScope.put(name, new GlobalVariable(new
ReadonlyAccessor(name, accessor)));
}
}
public boolean isDefined(String name) {