Initialize a delegator.

@param {Object} proto
@param {String} target
@api public
490324
function Delegator(proto, target) {
  if (!(this instanceof Delegator)) return new Delegator(proto, target);
  this.proto = proto;
  this.target = target;
  this.methods = [];
  this.getters = [];
  this.setters = [];
  this.fluents = [];
}
1119347
function wrapInit(target, reactionName) {
	target.init = (function(init) {
		return function(vm) {
			if (init)
				init.apply(this, arguments);
			initvm(vm, reactionName);
		};
	})(target.init);
}
1182736
protected void init(T[] ancestorDefinition, T[] recipientDefinition, List<T> sameDefinitionData,
      List<RelatedDefinition<T>> changedDefinitionData, List<T> newDefinitionData, List<T> removedDefinitionData)
   {
      for (int i = 0; i < recipientDefinition.length; i++)
      {
         boolean isNew = true;
         for (int j = 0; j < ancestorDefinition.length; j++)
         {
            if (recipientDefinition[i].getName().equals(ancestorDefinition[j].getName()))
            {
               isNew = false;
               if (recipientDefinition[i].equals(ancestorDefinition[j]))
                  sameDefinitionData.add(recipientDefinition[i]);
               else
               {
                  RelatedDefinition<T> relatedDefinition =
                     new RelatedDefinition<T>(ancestorDefinition[j], recipientDefinition[i]);
                  changedDefinitionData.add(relatedDefinition);
               }
            }
         }
         if (isNew)
            newDefinitionData.add(recipientDefinition[i]);
      }
      for (int i = 0; i < ancestorDefinition.length; i++)
      {
         boolean isRemoved = true;
         for (int j = 0; j < recipientDefinition.length && isRemoved; j++)
         {
            if (recipientDefinition[j].getName().equals(ancestorDefinition[i].getName()))
            {
               isRemoved = false;
               break;
            }
         }
         if (isRemoved)
            removedDefinitionData.add(ancestorDefinition[i]);
      }
   }
1323952
function defineOnPrototype(ctor, methods) {
  var proto = ctor.prototype;
  forEachProperty(methods, function(val, key) {
    proto[key] = val;
  });
}
21545
function _init(type, target) {
    this.type    = type
    this.target  = target
    this.current = target
    this.halted  = false
    this.handled = false
    return this }
449782
public void processingInstruction(String target, String data) throws SAXException {
		emitWhitespace();
		super.processingInstruction(target, data);
	}
322387
public void init(CommsErrorListener CEL,
                   RoutingManager RM)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "init", new Object[] { CEL, RM});

    // Lock exclusively for start operations
    mpioLockManager.lockExclusive();
    _commsErrorListener = CEL;
    _routingManager = RM;
    
    synchronized(_mpConnectionsByMEConnection)
    {
      _mpConnectionsByMEUuid.clear();
      _mpConnectionsByMEConnection.clear();
    }
    
    // Create a new RemoteMessageReceiver if we don't already have one
    // or re-initialise the existing one to refresh any cached data
    // (used when an ME is re-started without the Server being re-started) 
    if(_remoteMessageReciever == null)
      _remoteMessageReciever = new RemoteMessageReceiver(_messageProcessor, this);
    else
      _remoteMessageReciever.init();
    
    started = true;    
    mpioLockManager.unlockExclusive();
          
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "init");
  }
750683
function init(subject) {  // {{{2
/**
 * Constructor
 *
 * @param subject {Object} Slave subject
 *
 * @method constructor
 */

  if (subject.master) {
    throw O.log.error(subject, 'Duplicit `subject.master`', {master: subject.master._lid});
  }

  this.subject = subject;
  subject.master = this;
  this.subject.getGw(onGw.bind(null, subject));
}
258801
private void replacePrototypeMemberDeclaration(PrototypeMemberDeclaration declar) {
    // x.prototype.y = ...  ->  t.y = ...
    Node assignment = declar.node.getFirstChild();
    Node lhs = assignment.getFirstChild();
    Node name = NodeUtil.newQName(
        compiler,
        PROTOTYPE_ALIAS + "." + declar.memberName, declar.node,
        declar.memberName);

    // Save the full prototype path on the left hand side of the assignment for debugging purposes.
    // declar.lhs = x.prototype.y so first child of the first child is 'x'.
    Node accessNode = declar.lhs.getFirstFirstChild();
    String originalName = accessNode.getOriginalName();
    String className = originalName != null ? originalName : "?";
    name.getFirstChild().useSourceInfoFromForTree(lhs);
    name.putBooleanProp(Node.IS_CONSTANT_NAME, lhs.getBooleanProp(Node.IS_CONSTANT_NAME));
    name.getFirstChild().setOriginalName(className + ".prototype");

    assignment.replaceChild(lhs, name);
    compiler.reportChangeToEnclosingScope(name);
  }
1001974
function init(proto) {
    proto.prototype.flush = function flush(to, axis, mside, wside) {
        return util.flush(this, to, axis, mside, wside);
    };

    proto.prototype.snap = function snap(to, axis, orientation, delta) {
        return util.snap(this, to, axis, orientation, delta);
    };

    proto.prototype.calcSnap = function calcSnap(to, axis, orientation, delta) {
        return util.calcSnap(this, to, axis, orientation, delta);
    };

    proto.prototype.midlineTo = function midlineTo(axis, to) {
        return util.midlineTo(this, axis, to);
    };

    proto.prototype.calcmidlineTo = function midlineTo(axis, to) {
        return util.calcmidlineTo(this, axis, to);
    };

    proto.prototype.centerWith = function centerWith(axis, to) {
        util.depreciated('centerWith', true, 'Use align instead.');
        return util.centerWith(this, axis, to);
    };

    if (proto.center) echo('proto already has .center');
    proto.prototype.center = function center(axis) {
        // console.log('center', axis, this.getBounds());
        return util.centerWith(this, axis || 'xyz', util.unitCube(), 0);
    };

    proto.prototype.calcCenter = function centerWith(axis) {
        return util.calcCenterWith(this, axis || 'xyz', util.unitCube(), 0);
    };

    proto.prototype.align = function align(to, axis) {
        // console.log('align', to.getBounds(), axis);
        return util.centerWith(this, axis, to);
    };

    proto.prototype.calcAlign = function calcAlign(to, axis, delta) {
        return util.calcCenterWith(this, axis, to, delta);
    };

    proto.prototype.enlarge = function enlarge(x, y, z) {
        return util.enlarge(this, x, y, z);
    };

    proto.prototype.fit = function fit(x, y, z, a) {
        return util.fit(this, x, y, z, a);
    };

    if (proto.size) echo('proto already has .size');

    proto.prototype.size = function() {
        return util.size(this.getBounds());
    };

    proto.prototype.centroid = function() {
        return util.centroid(this);
    };

    proto.prototype.Zero = function zero() {
        return util.zero(this);
    };

    proto.prototype.Center = function Center(axes) {
        return this.align(util.unitCube(), axes || 'xy');
    };

    proto.Vector2D.prototype.map = function Vector2D_map(cb) {
        return new proto.Vector2D(cb(this.x), cb(this.y));
    };

    proto.prototype.fillet = function fillet(radius, orientation, options) {
        return util.fillet(this, radius, orientation, options);
    };

    proto.prototype.chamfer = function chamfer(radius, orientation, options) {
        return util.chamfer(this, radius, orientation, options);
    };

    proto.prototype.bisect = function bisect(
        axis,
        offset,
        angle,
        rotateaxis,
        rotateoffset,
        options
    ) {
        return util.bisect(
            this,
            axis,
            offset,
            angle,
            rotateaxis,
            rotateoffset,
            options
        );
    };

    proto.prototype.stretch = function stretch(axis, distance, offset) {
        return util.stretch(this, axis, distance, offset);
    };

    proto.prototype.unionIf = function unionIf(object, condition) {
        return condition ? this.union(util.result(this, object)) : this;
    };

    proto.prototype.subtractIf = function subtractIf(object, condition) {
        return condition ? this.subtract(util.result(this, object)) : this;
    };

    proto.prototype._translate = proto.prototype.translate;

    /**
      * This modifies the normal `proto.translate` method to accept
      * multiple translations, adding the translations together.
      * The original translate is available on `proto._translate` and
      * a short circut is applied when only one parameter is given.
      * @return {proto} The resulting object.
      */
    proto.prototype.translate = function translate() {
        if (arguments.length === 1) {
            return this._translate(arguments[0]);
        } else {
            var t = Array.prototype.slice.call(arguments, 0).reduce(function(
                result,
                arg
            ) {
                // console.log('arg', arg);
                result = util.array.addArray(result, arg);
                return result;
            }, [0, 0, 0]);

            // console.log('translate', t);
            return this._translate(t);
        }
    };
}
591152
function ProtoIR(irType, name) {
    this.irType = irType;
    this.names = new Set(name ? [name] : undefined);
    this.start = Infinity;
    this.end = -Infinity;
    this.associatedEvents = new tr.model.EventSet();
  }
180841
function (eventType, event, target) {

                if (!(event instanceof EventDispatcher.Event)) {
                    event = new EventDispatcher.Event(event);
                }

                if (!event.target) {
                    event.target = target || this;
                }

                event.type = eventType;


                if (!(this._eventHandlers[eventType] || this._eventHandlers["*"])) {
                    return event;
                }

                var list,
                    result, i;

                if (this._eventHandlers[eventType]) {

                    list = this._eventHandlers[eventType].slice();
                    for (i = 0; i < list.length; i++) {
                        if (list[i]) {
                            result = list[i].trigger(event, event.target);
                            if (result !== undefinedValue) {

                                if (result === false) {
                                    event.preventDefault();
                                    event.stopPropagation();
                                }
                            }

                            if (event.isImmediatePropagationStopped) {
                                break;
                            }
                        }
                    }
                }

                if (this._eventHandlers["*"]) {

                    list = this._eventHandlers["*"].slice();
                    for (i = 0; i < list.length; i++) {
                        if (list[i]) {
                            result = list[i].trigger(event, target);
                            if (result !== undefinedValue) {

                                if (result === false) {
                                    event.preventDefault();
                                    event.stopPropagation();
                                }
                            }

                            if (event.isImmediatePropagationStopped) {
                                break;
                            }
                        }
                    }
                }

                return event;
            }
1120033
@Override
    protected void init(Object target, PropertyInfo propInfo, PropertyGrid propGrid) {
        propInfo.getConfig().setProperty("readonly", Boolean.toString(!SecurityUtil.hasDebugRole()));
        super.init(target, propInfo, propGrid);
        List<IAction> actions = new ArrayList<>(ActionRegistry.getRegisteredActions(ActionScope.BOTH));
        Collections.sort(actions, ActionUtil.comparator);
        
        for (IAction action : actions) {
            appendItem(action.toString(), action.getId());
        }
    }
393349
function(key, value, proto, parseProtoCheck, reviveDate) {
        if (reviveDate && (typeof value==='string')) {
            return value.toDate() || value;
        }
        if (!Object.isObject(value)) {
            return value;
        }
        // only first level of objects can be given the specified prototype
        if ((typeof parseProtoCheck === 'function') && !parseProtoCheck(value)) {
            return value;
        }
        if (PROTO_SUPPORTED) {
            value.__proto__ = proto;
            return value;
        }
        return value.deepClone(null, proto);
    }
1187527
function getPropertyDescriptor(target, name) {
        var pd = Object.getOwnPropertyDescriptor(target, name),
            proto = Object.getPrototypeOf(target);
        while (typeof pd === 'undefined' && proto !== null) {
            pd = Object.getOwnPropertyDescriptor(proto, name);
            proto = Object.getPrototypeOf(proto);
        }
        return pd;
    }
1089420
public function _init($proto, $class = null) 
    {
      $this->active = false;
      $this->model = $class;
      $cons = $proto[0]->get();	
      $args = $proto[1]->get();
      /** make sure our constraints match **/

      foreach ($cons as $k => $v) {
        /** 
         * one constraint does not match
         * when this happens we need
         * to revoke the event
         *
         * i.e
         * MessageEvent(array("direction" => "incoming"))
         *
         * should not accept outgoing
         */
        if (isset($args[$k]) 
           && $args[$k] !== $v) {
          return;
        }
      }

      /**
       * now that our constraints match
       * make sure 'eventType' is this classes
       * type. 
       */

      if (!($this->isInvoked($args))) {
        return;
      }

      /** set the variables **/

      foreach ($args as $k => $v) {
        $this->$k = $v;
      }

      /**
       * TODO move
       *
       * as of now model will not autmatically
       * be made.
       */
      //$this->model->id = $args['id'];
      //$this->model->get();
    }
840697
public static void initialize(Context context, int components) {
        NotificationDelegater delegater = getInstance();
        if (delegater.center() != null)
            throw new IllegalStateException("NotificationDelegater already init.");

        delegater.setContext(context);
        delegater.initComponents(components);
        Log.i(TAG, "Notification delegater initialize");
    }