Set the object that owns this listener.
@owner The object that this listener is being added to (if null, this listener is being removed).
337724
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            Record recUserInfo = this.getOwner();
            RecordOwner recordOwner = recUserInfo.getRecordOwner();
            Record recUserScreenRecord = (Record)recordOwner.getScreenRecord();
            // This will flag the password as changed:
            recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_1).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true));
            recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_2).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true));
        }
    }
96462
public void addListener(ISUPListener listener) {
        if (listener == null) {
            throw new NullPointerException("Listener must not be null!");
        }
        if (this.listeners.contains(listener)) {
            throw new IllegalArgumentException("Listener already present: " + listener + " !");
        } else {
            this.listeners.add(listener);
        }

    }
397598
def method_owner(method_symbol)
      # Under normal circumstances just calling @object.method(method_symbol) would work,
      # but this will go wrong if the object has redefined the method method.
      method = Object.instance_method(:method).bind(@object).call(method_symbol)

      method.owner
    rescue NameError
      poor_mans_method_owner(method, method_symbol.to_s)
    end
221989
public boolean addLockedObjectOwner(String owner) {

        if (_owner == null) {
            _owner = new String[1];
        } else {

            int size = _owner.length;
            String[] newLockObjectOwner = new String[size + 1];

            // check if the owner is already here (that should actually not
            // happen)
            for (int i = 0; i < size; i++) {
                if (_owner[i].equals(owner)) {
                    return false;
                }
            }

            System.arraycopy(_owner, 0, newLockObjectOwner, 0, size);
            _owner = newLockObjectOwner;
        }

        _owner[_owner.length - 1] = owner;
        return true;
    }
537423
public void init(ListenerOwner owner)
    {
        m_owner = owner;
        m_nextListener = null;
        m_bEnabled = true;
        m_dependentListener = null;
        m_dependentStateListener = null;
        if (owner != null)
            owner.addListener(this);
    }
454817
public void setListener(T listener) {
		Assert.notNull(listener, "Listener must not be null");
		Assert.isTrue(isSupportedType(listener), "Listener is not of a supported type");
		this.listener = listener;
	}
1224929
@Override public void onAttached(Run<?,?> owner) {
        for (Cause c : causeBag.keySet()) {
            if (c != null) {
                c.onAddedTo(owner);
            }
        }
    }
872014
public void setListeners(Listener[] listeners) {
        if (listeners != null && listeners.length > 0
                && this.listeners != null && this.listeners.length > 0) {
            Listener[] oldListeners = this.listeners;
            this.listeners = new Listener[oldListeners.length + listeners.length];
            System.arraycopy(oldListeners, 0, this.listeners, 0, oldListeners.length);
            System.arraycopy(listeners, 0, this.listeners, oldListeners.length, listeners.length);
        } else {
            this.listeners = listeners;
        }
    }
1346315
public void addListener(LifecycleListener listener)
  {
    synchronized (this) {
      if (isDestroyed()) {
        IllegalStateException e = new IllegalStateException("attempted to add listener to a destroyed lifecyle " + this);

        if (_log != null)
          _log.log(Level.WARNING, e.toString(), e);
        else
          Logger.getLogger(Lifecycle.class.getName()).log(Level.WARNING, e.toString(), e);

        return;
      }

      if (_listeners == null)
        _listeners = new ArrayList<WeakReference<LifecycleListener>>();

      for (int i = _listeners.size() - 1; i >= 0; i--) {
        LifecycleListener oldListener = _listeners.get(i).get();

        if (listener == oldListener)
          return;
        else if (oldListener == null)
          _listeners.remove(i);
      }

      _listeners.add(new WeakReference<LifecycleListener>(listener));
    }
  }
1328810
public void setListeners(final List listeners) {
        // early type check, and avoid aliassing
        this.preListeners = new ArrayList<IReloadablePropertiesListener>();
        for (Object o : listeners) {
            preListeners.add((IReloadablePropertiesListener) o);
        }
    }
260963
public static void setOrAdd(EObject owner, EReference reference, Object value) {
		if (value != null) {
			if (reference.isMany()) {
				@SuppressWarnings("unchecked")
				Collection<EObject> values = (Collection<EObject>) owner.eGet(reference, false);
				if (values != null && value instanceof EObject) {
					values.add((EObject) value);
				}
			} else {
				owner.eSet(reference, value);
			}
		}
	}
81577
public void setLifecycleOwner(@Nullable LifecycleOwner lifecycleOwner) {
        this.lifecycleOwner = lifecycleOwner;
        if (recyclerView != null) {
            for (int i = 0; i < recyclerView.getChildCount(); i++) {
                View child = recyclerView.getChildAt(i);
                ViewDataBinding binding = DataBindingUtil.getBinding(child);
                if (binding != null) {
                    binding.setLifecycleOwner(lifecycleOwner);
                }
            }
        }
    }
869459
def set_listener(self, name, listener):
        
        with self.__listeners_change_condition:
            self.listeners[name] = listener
226747
@Override
  public void bind()
  {
    if (_ownerProvider == null) {
      _ownerBinding.bind();
      
      _ownerProvider = _ownerBinding.provider(); 

      _program = _manager.program(_method.getParameters());
    }
  }
1351924
@Override
  public int owner(int hash)
  {
    NodePodAmp delegate = delegate();
    
    if (delegate != null) {
      return delegate().owner(hash);
    }
    else {
      return 0;
    }
  }
933169
def owner=(obj)
      if obj.nil? then
        op, ov = effective_owner_property_value || return
      else
        op = self.class.owner_properties.detect { |prop| prop.type === obj }
      end
      if op.nil? then raise NoMethodError.new("#{self.class.qp} does not have an owner attribute for #{obj}") end
      set_property_value(op.attribute, obj)
    end
55301
public void setOwner(ListenerOwner owner)
    {
        if (owner != null)
        if (m_fldDest == null)
            if (fieldName != null)
                m_fldDest = ((BaseField)owner).getRecord().getField(fieldName);
        super.setOwner(owner);
    }