/* Instance class memebers.
******************************************************
503099
function ActivityScope(name, parent, seed) {
            _classCallCheck(this, ActivityScope);

            if (parent && !(parent instanceof ActivityScope)) {
                throw new Error('parent must be an activity scope.');
            }

            if (seed && !(seed instanceof uuid)) {
                throw new Error('seed must be a valid UUID.');
            }

            this.innerid = seed || new uuid();
            this.innername = name;
            this.innerparent = parent || null;

            activityTracker.start(this);
        }
255695
function instance(input) {
  return str(input)
    || fn(input)
    || obj(input)
    || raise(input);
}
1342229
def readInstances(self, makeGlyphs=True, makeKerning=True, makeInfo=True):
        
        for instanceElement in self.root.findall('.instances/instance'):
            self._readSingleInstanceElement(instanceElement, makeGlyphs=makeGlyphs, makeKerning=makeKerning, makeInfo=makeInfo)
543261
protected function makeClassInstance()
    {
        $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
        $this->entryStorage = $objectManager->get(ObjectStorage::class);
        $this->pageRepository = $objectManager->get(PageRepository::class);
        $this->fieldValueService = $objectManager->get(FieldValueService::class);
    }
101422
function () {
        $assertEveryCalledOnce (function (prototypeMethod, instanceMethod) {
            var instance = null
            var Compo = new $component ({
                prototypeMethod: function () { $assert (this === instance); prototypeMethod () } })
            instance = new Compo ({
                instanceMethod:  function () { $assert (this === instance); instanceMethod () } })

            instance.prototypeMethod.call (null)
            instance.instanceMethod.call (null) }) }
132718
function instanceOfOne(x) {
    for (var _len5 = arguments.length, types = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
      types[_key5 - 1] = arguments[_key5];
    }

    return types.some((0, _object.instanceOf)(x));
  }
1373731
function detect_class_members_from_array(cls, ast) {
  cls["members"] = [];
  return _.each(ast["elements"], function(el) {
    detect_method_or_property(cls, key_value(el), el, el);
  });
}
91807
function instanceMethod(method) {
		return function (req, res, next) {

			var done = function (err, data) {
				if (err) {
					return res.status(400).send(err);
				}
				return res.send(data);
			};

			var id = req.params.id;
			if (id) {
				Model.findById(id, function (err, data) {
					if (err) {
						debug('Method middleware Model.findById error:', err);
						return next(err);
					}
					if (data) {
						data[method](req, res, done, next);
					} else {
						return res.status(404).send();
					}
				});
			} else {
				return res.status(404).send();
			}
		};
	}
335909
function NWTEventInstance (e, attrs) {
	this._e = e;
	this.target = new NWTNodeInstance(e.target);

	for (var i in attrs) {
		this[i] = attrs[i];
	}
}
745107
def each_instance( namespace_or_objectpath, classname = nil )
    op = if namespace_or_objectpath.is_a? Sfcc::Cim::ObjectPath
      namespace_or_objectpath
    else
      objectpath namespace_or_objectpath, classname
    end
    begin
      @client.instances(op).each do |inst|
        yield inst
      end
    rescue Sfcc::Cim::ErrorInvalidClass, Sfcc::Cim::ErrorInvalidNamespace
    end
  end
1000327
function () {
            var el = this.element(),
                cName = $B( el ).attr( 'class' ),
                args = arguments;
    
            if ( cName ) {
                var argNum = args.length, selector = '', i;
    
                for ( i = 0; i < argNum; ++i ) {
                    var arg = args[i];
                    if ( !$B.string.isWholeWord( cName, arg ) ) selector += ( ' ' + arg );
                }
    
                $B( el ).attr( 'class', cName + selector );
            } else {
                $B( el ).attr( 'class', Array.prototype.slice.call(args).join(' ') );
            }
        }
857159
function _class(_ref) {
    var args = _ref.args;
    var config = _ref.config;

    _classCallCheck(this, _class);

    var on = null;
    var from = '*';
    var cbOn = null;
    var cbOff = null;
    var alwaysTrigger = false;

    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;

    try {
      for (var _iterator = args[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var arg = _step.value;

        switch (typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) {
          case 'string':
            if (on === null) {
              on = arg;
            } else {
              from = arg;
            }
            break;
          case 'function':
            if (cbOn === null) {
              cbOn = arg;
            } else {
              cbOff = arg;
            }
            break;
          case 'boolean':
            alwaysTrigger = arg;
        }
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator.return) {
          _iterator.return();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }

    _extends(this, {
      isActive: null,
      matchesOn: parseMatchInputString(on, config.inversePrefix),
      matchesFrom: parseMatchInputString(from, config.inversePrefix),
      cbOn: cbOn, cbOff: cbOff, alwaysTrigger: alwaysTrigger
    });
  }
139778
function createInstance(desc) {
  var fields = ['exact', 'instance', 'selector'];
  utils.check(fields, desc);
  return { exact: desc.exact, instance: desc.instance, selector: desc.selector};
}
1349128
static function instance($class = null) {
        if (!$class) {
            $class = get_called_class();
        }
        if (!is_a($class, ValidateBuilder::class, true)) {
            throw new \Exception($class . ' is not a subclass of ' . ValidateBuilder::class);
        }
        if (!isset(self::$instances[$class])) {
            self::$instances[$class] = new $class;
        }

        return self::$instances[$class];
    }
451014
function(objID, typeName)
    {
        var objType = this.getTypeFromName(typeName);
	        instanceFactory.prototype = objType;
	        var instance = new instanceFactory(objID);
        this.remoteInstanceCache[objID] = instance;
        return instance;
    }
1295152
static public function isInstanceOf($value, $className, $message = null, $propertyPath = null)
        {
            if ( ! ($value instanceof $className)) {
                $message = $message ?: sprintf(
                    'Class "%s" was expected to be instanceof of "%s" but is not.',
                    static::stringify($value),
                    $className
                );

                throw static::createException($value, $message, static::INVALID_INSTANCE_OF, $propertyPath, array('class' => $className));
            }
        }
470462
function Class(parent, api) {
    if ( !api) {
      parent = (api = parent, 0);                                     // !api means there's no parent
    }

    var clazz, constructor, singleton, statics, key, bindTo, len, i = 0, p,
        ignoredKeys = { constructor: 1, $singleton: 1, $statics: 1, prototype: 1, $super: 1, $superp: 1, main: 1, toString: 0 },
        plugins     = Class.plugins;

    api         = (typeof api === "function" ? api() : api) || {};             // execute api if it's a function
    constructor = api.hasOwnProperty("constructor") ? api.constructor : 0;     // hasOwnProperty is a must, constructor is special
    singleton   = api.$singleton;
    statics     = api.$statics;

    // add plugins' keys into ignoredKeys
    for (key in plugins) { ignoredKeys[key] = 1; }

    // construct constructor
    clazz  = singleton ? {} : (constructor ? constructor : function(){});

    // determine bindTo: where api should be bound
    bindTo = singleton ? clazz : clazz.prototype;

    // make sure parent is always an array
    parent = !parent || arrayOrNil(parent) ? parent : [ parent ];

    // do inherit
    len = parent && parent.length;
    while (i < len) {
      p = parent[i++];
      for (key in p) {
        if ( !ignoredKeys[key]) {
          bindTo[key] = p[key];
          if ( !singleton) { clazz[key] = p[key]; }
        }
      }
      for (key in p.prototype) { if ( !ignoredKeys[key]) { bindTo[key] = p.prototype[key]; } }
    }

    // copy properties from api to bindTo
    for (key in api) {
      if ( !ignoredKeys[key]) {
        bindTo[key] = api[key];
      }
    }

    // copy static properties from statics to both clazz and bindTo
    for (key in statics) { clazz[key] = bindTo[key] = statics[key]; }

    // if class is not a singleton, add $super and $superp
    if ( !singleton) {
      p = parent && parent[0] || parent;
      clazz.$super  = p;
      clazz.$superp = p && p.prototype ? p.prototype : p;
      bindTo.$class = clazz;
    }

    for (key in plugins) { plugins[key](clazz, parent, api); }                 // pass control to plugins
    if (functionOrNil(api.main)) { api.main.call(clazz, clazz); }              // execute main()
    return clazz;
  }