Add a new observer for a given property
@param {object} observer object with a onPropChange() method
@param {string} property the property name to observe (optional)
13646
function (observer, property) {
        if (!property)
            property = ALL;
        var arr = this.props[property];
        if (!arr) {
            // property is not observed yet
            arr = [];
            this.props[property] = arr;
        }
        arr.push(observer);
    }
1166470
public void setProperty(Object object, String property, Object newValue) {
        setProperty(theClass, object, property, newValue, false, false);
    }
167619
public void addClientObserver (ClientObserver observer)
    {
        _clobservers.add(observer);
        if (observer instanceof DetailedClientObserver) {
            _dclobservers.add((DetailedClientObserver)observer);
        }
    }
153563
def addObserver(self, observer):
        """"""
        Observable.addObserver(self, observer)

        # If self.startOnDemand is True, the reader monitoring
        # thread only runs when there are observers.
        if self.startOnDemand:
            if 0 < self.countObservers():
                if not self.rmthread:
                    self.rmthread = ReaderMonitoringThread(
                        self,
                        self.readerProc, self.period)

                    # start reader monitoring thread in another thread to
                    # avoid a deadlock; addObserver and notifyObservers called
                    # in the ReaderMonitoringThread run() method are
                    # synchronized
                    try:
                        # Python 3.x
                        import _thread
                        _thread.start_new_thread(self.rmthread.start, ())
                    except:
                        # Python 2.x
                        import thread
                        thread.start_new_thread(self.rmthread.start, ())
        else:
            observer.update(self, (self.rmthread.readers, []))
1124857
function mdObserver_observe(aSubject, aTopic, aData) {
    // Once the window has been found and loaded we can execute the callback
    var window = this.findWindow();
    if (window && ("documentLoaded" in window)) {
      try {
        this._callback(new mozmill.controller.MozMillController(window));
      }
      catch (ex) {
        // Store the exception, so it can be forwarded if a modal dialog has
        // been opened by another modal dialog
        this.exception = ex;
      }

      if (window) {
        window.close();
      }

      this.finished = true;
      this.stop();
    }
    else {
      // otherwise try again in a bit
      this._timer.init(this, DELAY_CHECK, Ci.nsITimer.TYPE_ONE_SHOT);
    }
  }
908689
function observe (value, asRootData) {
  if (!isObject(value) || value instanceof VNode) {
    return
  }
  var ob;
  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
    ob = value.__ob__;
  } else if (
    shouldObserve &&
    !isServerRendering() &&
    (Array.isArray(value) || isPlainObject(value)) &&
    Object.isExtensible(value) &&
    !value._isVue
  ) {
    ob = new Observer(value);
  }
  if (asRootData && ob) {
    ob.vmCount++;
  }
  return ob
}
382539
function(observer, skipUpdate) {
    this.observers.add(observer);
    if (!skipUpdate) {
      observer.forceUpdateNextSync = true;
      observer.sync();
    }
  }
355531
function ( key, propertyObject ) {
            key = key.toLowerCase();
        
            this.config[key] = propertyObject;
        
            propertyObject.event = this.createEvent(key, { scope: this.owner });
            propertyObject.event.signature = CustomEvent.LIST;
            
            
            propertyObject.key = key;
        
            if (propertyObject.handler) {
                propertyObject.event.subscribe(propertyObject.handler, 
                    this.owner);
            }
        
            this.setProperty(key, propertyObject.value, true);
            
            if (! propertyObject.suppressEvent) {
                this.queueProperty(key, propertyObject.value);
            }
            
        }
129286
public static void addObserver(TaskObserver<?> observer) {
		if(observer != null && tls.get().observers == null) {
			tls.get().observers = new ArrayList<TaskObserver<?>>();
		}
		tls.get().observers.add(observer);
	}
627486
function() {
      var n$ = this._observeNames;
      if (n$ && n$.length) {
        var o = this._propertyObserver = new CompoundObserver(true);
        this.registerObserver(o);
        // TODO(sorvell): may not be kosher to access the value here (this[n]);
        // previously we looked at the descriptor on the prototype
        // this doesn't work for inheritance and not for accessors without
        // a value property
        for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {
          o.addPath(this, n);
          this.observeArrayValue(n, this[n], null);
        }
      }
    }
707938
function (object, property, value) {
        if (object[OBSERVER_PROPERTY]) {
            var exists = ownProperty.call(object, property), oldVal = object[property], sz1 = object.length, chgset=null;
            object[property] = value;

            if (!exists) {
                chgset=[changeDesc(object, property, value, oldVal, "new")];
            } else if (oldVal !== value) {
                // do nothing if the value did not change or was not created:
                chgset=[changeDesc(object, property, value, oldVal, "updated")];
            }
            if (object.constructor === Array) {
                var sz2 = object.length;
                if (sz1 !== sz2) {
                    if (!chgset) {
                        chgset=[];
                    }
                    chgset.push(changeDesc(object, "length", sz2, sz1, "updated"));
                }
            }
            if (chgset) {
                callObservers(object, chgset);
            }
        } else {
            object[property] = value;
        }
        return value;
    }
661001
public void setObserver(Map<String, Object> observer) {
        removeEntriesStartingWith(OBSERVER);
        eventMap.putAll(observer);
    }
328745
def register_observer(self):
        
        self.execution_engine.add_observer(self, "start", notify_before_function=self.on_start)
        self.execution_engine.add_observer(self, "pause", notify_before_function=self.on_pause)
        self.execution_engine.add_observer(self, "stop", notify_before_function=self.on_stop)
84118
public void addProperty(ReadableProperty<R> property) {
        property.addValueChangeListener(changeAdapter);
        properties.add(property);
        updateFromProperties();
    }
145513
function observe (value) {
	  if (!isObject(value)) {
	    return
	  }
	  var ob;
	  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
	    ob = value.__ob__;
	  } else if (
	    observerState.shouldConvert &&
	    !config._isServer &&
	    (Array.isArray(value) || isPlainObject(value)) &&
	    Object.isExtensible(value) &&
	    !value._isVue
	  ) {
	    ob = new Observer(value);
	  }
	  return ob
	}
1189392
public void addProperty( String property)
    {
    String candidate = StringUtils.trimToNull( property);
    if( candidate != null)
      {
      properties_.add( property);
      }
    }
912189
function callObservers(object, chgeset) {
    var ln = object[OBSERVER_PROPERTY];
    if (ln) {
        var elt;
        for (var i = 0, sz = ln.length; sz > i; i++) {
            elt = ln[i];
            if (elt.constructor === Function) {
                elt(chgeset);
            }
        }
    }
}