code: public static void addToScope(Scriptable scope, Object object, String... names) {
  		Object jsObject = Context.javaToJS(object, scope);
  		for (String name : names) {
  			name = name.replaceAll(" ", "_");
  			ScriptableObject.putProperty(scope, name, jsObject);
  		}
  	}
docs: Adds an object to the JavaScript scope with a set of variable names
  
  @param scope
  @param object
  @param names