Class constructor
762563
function SvgPath(path) {
  if (!(this instanceof SvgPath)) { return new SvgPath(path); }

  var pstate = pathParse(path);

  // Array of path segments.
  // Each segment is array [command, param1, param2, ...]
  this.segments = pstate.segments;

  // Error message on parse error.
  this.err      = pstate.err;

  // Transforms stack for lazy evaluation
  this.__stack    = [];
}
758779
private Object initiateByConstructor(Class<?> targetClass, List<Object> objects) throws Exception {
        Constructor<?> constr = targetClass.getConstructor(getClassList(objects));
        return constr.newInstance(objects.toArray());
    }
576131
function constructor(attributes, options) {
      var hooks = []
        , local = {};

      options = options || {};

      //
      // Set the database name and/or urlRoot if provided in the options.
      //
      if (options.database) this.database = options.database;
      if (options.urlRoot) this.urlRoot = options.urlRoot;

      //
      // Copy attributes to a new object and provide a MongoDB OfbjectID.
      //
      attributes = attributes || {};
      for (var key in attributes) local[key] = attributes[key];

      //
      // If the provided `_id` is an ObjectID assume the model is stored.
      // If it is not an ObjectID, remove it from the provided data.
      // MongoDB will provide an ObjectID by default.
      //
      if ('_id' in local) try {
        local._id = new ObjectID(local._id);
      } catch (error) { delete local._id; }

      //
      // Define restricted non-enumerated properties.
      //
      predefine(this, fossa);

      //
      // Check for presence of before/after hooks and setup.
      //
      if (this.before) hooks.push('before');
      if (this.after) hooks.push('after');
      this.setup(hooks);

      //
      // Call original Backbone Model constructor.
      //
      backbone.Model.call(this, local, options);
    }
1374862
private <T> Constructor<T> findFromStringConstructorByType(Class<T> cls) {
        try {
            return cls.getDeclaredConstructor(String.class);
        } catch (NoSuchMethodException ex) {
            try {
                return cls.getDeclaredConstructor(CharSequence.class);
            } catch (NoSuchMethodException ex2) {
                throw new IllegalArgumentException("Constructor not found", ex2);
            }
        }
    }
580053
function Class() {
        var i, mixins, mixin, self = this;

        // All construction is actually done in the init method
        if (!initializing) {
          // Run class constuctor
          if (self.init) {
            self.init.apply(self, arguments);
          }

          // Run mixin constructors
          mixins = self.Mixins;
          if (mixins) {
            i = mixins.length;
            while (i--) {
              mixin = mixins[i];
              if (mixin.init) {
                mixin.init.apply(self, arguments);
              }
            }
          }
        }
      }
1352268
function constructor(username) {
    /*
     * Set itemsPerPage variable
     *
     * @param Mixed newItemsPerPage
     */

    function setItemsPerPage(newItemsPerPage) {
        itemsPerPage = newItemsPerPage;
    }

    /*
     * Get itemsPerPage variable
     *
     */

    function getItemsPerPage() {
        return itemsPerPage;
    }

    /*
     * Set currentPage variable
     *
     * @param Number newItemsPerPage
     */

    function setCurrentPage(newCurrentPage) {
        currentPage = newCurrentPage;
    }

    /*
     * Get currentPage variable
     *
     */

    function getCurrentPage() {
        return currentPage;
    }

    /*
     * Get all the boards for the user
     *
     * @param boolean paginate
     * @param Function callback
     * @invoke callback(Mixed boards)
     */

    function getBoards(paginate, callback) {
        var boardsResponse;

        // Check for cache existence
        getCache('boards_' + username, true, function (cacheData) {
            if (cacheData === null) {
                // Create get request and put it in the cache
                get('http://pinterestapi.co.uk/' + username + '/boards', true, function (response) {
                    putCache('boards_' + username, JSON.stringify(response));

                    if (paginate) {
                        boardsResponse = buildResponse(response.body ? response.body : []);
                    } else {
                        boardsResponse = response.body ? response.body : [];
                    }
                    callback(boardsResponse);
                    return;
                });
            } else {
                if (paginate) {
                    boardsResponse = buildResponse(cacheData.body ? cacheData.body : []);
                } else {
                    boardsResponse = cacheData.body ? cacheData.body : [];
                }
                callback(boardsResponse);
                return;
            }
        });
    }

    /*
     * Get pins from a single board
     *
     * @param string board
     * @param boolean paginate
     * @param Function callback
     * @invoke callback(Mixed pins)
     */

    function getPinsFromBoard(board, paginate, callback) {
        var pins = [];
        var pinDateMap = {};

        async.parallel([
            function (asyncCallback) {
                getCache(board, true, function (cacheData) {
                    if (cacheData === null) {
                        // Get data and put it in the cache
                        get('https://api.pinterest.com/v3/pidgets/boards/' + username + '/' + board.replace(/#/g, '') + '/pins/', true, function (response) {
                            putCache(board, JSON.stringify(response));
                            pins = response.data ? response.data.pins : [];
                            asyncCallback();
                        });
                    } else {
                        pins = cacheData.data ? cacheData.data.pins : [];
                        asyncCallback();
                    }
                });
            },
            function (asyncCallback) {
                if (!obtainDates) {
                    asyncCallback();
                    return;
                }

                getDatesForBoardPinsFromRss(username, board, function (dates) {
                    pinDateMap = dates;
                    asyncCallback();
                    return;
                });
            }],
            function (err) {
                if (err) { throw err; }
                var pinIdsThatNeedDates = [];
                for (var i = 0; i < pins.length; i++) {
                    pins[i].created_at = null;
                    pins[i].created_at_source = null;
                    if (pinDateMap[pins[i].id]) {
                        pins[i].created_at = pinDateMap[pins[i].id];
                        pins[i].created_at_source = 'rss';
                    } else {
                        pinIdsThatNeedDates.push(pins[i].id);
                    }
                }

                if (obtainDates) {
                    getDatesForPinsFromScraping(pinIdsThatNeedDates, null, function (scrapedPinDateMap) {
                        for (var i = 0; i < pins.length; i++) {
                            if (scrapedPinDateMap[pins[i].id] && scrapedPinDateMap[pins[i].id].date) {
                                pins[i].created_at = scrapedPinDateMap[pins[i].id].date;
                                pins[i].created_at_source = scrapedPinDateMap[pins[i].id].source;
                            }
                        }
                        if (paginate) {
                            pins = buildResponse(pins);
                        }

                        callback(pins);
                        return;
                    });
                } else {
                    if (paginate) {
                        pins = buildResponse(pins);
                    }

                    callback(pins);
                    return;
                }
            }
        );
    }

    /*
     * Get all the user's pins (from all boards we can get)
     *
     * @param Function callback
     * @invoke callback(Object pins)
     */

    function getPins(callback) {
        var allPins = [];
        getBoards(false, function (boards) {
            async.each(boards, function(board, asyncCallback) {
                var splitHref = board.href.split('/');
                if (splitHref[1] === username) { // it's possible to have boards listed from other users
                    var boardHref = board.href.split('/')[2];
                    getPinsFromBoard(boardHref, false, function (pins) {
                        allPins = allPins.concat(pins);
                        asyncCallback();
                    });
                } else {
                    asyncCallback();
                }
            },
            function (err) {
                if (err) {
                    console.error('Error iterating through each board to get pins');
                    throw err;
                }
                callback(buildResponse(allPins));
                return;
            });
        });
    }

    /*
     * Get obtainDates variable
     *
     */

    function getObtainDates() {
        return obtainDates;
    }

    /*
     * Set obtainDates variable
     *
     * @param boolean bool
     */

    function setObtainDates(bool) {
        obtainDates = bool;
    }

    return {
        getPins: getPins,
        getBoards: getBoards,
        getPinsFromBoard: getPinsFromBoard,
        getCurrentPage: getCurrentPage,
        setCurrentPage: setCurrentPage,
        getItemsPerPage: getItemsPerPage,
        setItemsPerPage: setItemsPerPage,
        getObtainDates: getObtainDates,
        setObtainDates: setObtainDates
    };
}
610765
function (Class, descriptors) {
    var body = '"use strict";\n';
    var casters = {};
    each(descriptors, function (descriptor, name) {
      if (descriptor.writable || typeof descriptor.set === 'function') {
        var accessor = createAccessor(name);
        if (descriptor.cast || descriptor.type) {
          casters[name] = Casting.forDescriptor(descriptor);
          body += 'if (config' + accessor + ' !== undefined) {\n\
                      this' + accessor + ' = casters' + accessor + '(config' + accessor + ');\n\
                   }\n';
        }
        else {
          body += 'if (config' + accessor + ' !== undefined) {\n\
                      this' + accessor + ' = config' + accessor + ';\n\
                   }\n';
        }
      }
    });
    var configure = this.createDynamicFunction('casters', 'config', body);
    var fn = function (config) {
      return configure.call(this, casters, config);
    };
    fn.isAutoGenerated = true;
    return fn;
  }
1123840
public function init()
    {
        parent::init();
        $this->db = Instance::ensure($this->db, Connection::className());
        if ($this->cache !== null) {
            $this->cache = Instance::ensure($this->cache, Cache::className());
        }
    }
305107
public function init()
    {
        parent::init();
        $classes = array('table');
        if (isset($this->type) && !empty($this->type)) {
            if (is_string($this->type)) {
                $this->type = explode(' ', $this->type);
            }

            foreach ($this->type as $type) {
                $classes[] = 'table-' . $type;
            }
        }
        if (!empty($classes)) {
            $classes = implode(' ', $classes);
            if (isset($this->itemsCssClass)) {
                $this->itemsCssClass .= ' ' . $classes;
            } else {
                $this->itemsCssClass = $classes;
            }
        }
    }
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(' ') );
            }
        }
752969
def instantiate(self, cls=None):
        
        if cls is None:
            cls = self.cls
        if cls is None:
            raise TypeError("cls must a class")
        return cls.create(*self.args, **self.kwargs)
927942
private void defineConstructor()
    {
        //
        // declare the constructor
        MethodDefinition constructor = new MethodDefinition(
                a(PUBLIC),
                "<init>",
                type(void.class),
                parameters.getParameters()
        );

        // invoke super (Object) constructor
        constructor.loadThis().invokeConstructor(type(Object.class));

        // this.foo = foo;
        for (FieldDefinition fieldDefinition : parameters.getFields()) {
            constructor.loadThis()
                    .loadVariable(fieldDefinition.getName())
                    .putField(codecType, fieldDefinition);
        }

        // return; (implicit)
        constructor.ret();

        classDefinition.addMethod(constructor);
    }
495554
function (O, defaultConstructor) {
		// 7.3.20.1 Assert: Type(O) is Object.
		if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
			throw new TypeError('Assertion failed: Type(O) is not Object');
		}
		// 7.3.20.2 Let C be ? Get(O, "constructor").
		var C = O.constructor;
		// 7.3.20.3 If C is undefined, return defaultConstructor.
		if (typeof C === 'undefined') {
			return defaultConstructor;
		}
		// 7.3.20.4 If Type(C) is not Object, throw a TypeError exception
		if (!C || (typeof C !== 'object' && typeof C !== 'function')) {
			throw new TypeError('O.constructor is not an Object');
		}
		// 7.3.20.5 Let S be ? Get(C, @@species).
		var S = typeof Symbol === 'function' && typeof Symbol.species === 'symbol' ? C[Symbol.species] : undefined;
		// 7.3.20.6 If S is either undefined or null, return defaultConstructor.
		if (S === undefined || S === null) {
			return defaultConstructor;
		}
		// 7.3.20.7 If IsConstructor(S) is true, return S.
		if (typeof S === 'function' && S.prototype) {
			return S;
		}
		// 7.3.20.8 Throw a TypeError exception.
		throw new TypeError('no constructor found');
	}
847520
function(id, constructor, superklass) {

    var mtor = function() {};
    mtor.prototype  = superklass.prototype;

    function OpalClass() {};
    OpalClass.prototype = new mtor();

    var klass = new OpalClass();

    klass._id         = unique_id++;
    klass._alloc      = constructor;
    klass._isClass    = true;
    klass._name       = id;
    klass._super      = superklass;
    klass.constructor = OpalClass;
    klass._methods    = [];
    klass.__inc__     = [];
    klass.__parent    = superklass;
    klass._proto      = constructor.prototype;

    constructor.prototype._klass = klass;

    Opal[id] = klass;
    Opal.constants.push(id);

    return klass;
  }
822076
function (def, superclass) {
        if (!Aria.memCheckMode) {
            return def.$constructor;
        }
        return function () {
            try {
                if (!this['aria:objnumber']) {
                    __nbConstructions++;
                    this['aria:objnumber'] = __nbConstructions;
                    __objects[__nbConstructions] = this;
                }
                // check that parent constructors are correctly called
                __checkInheritanceCalls(this, def, superclass, "$constructor", arguments);
            } catch (e) {
                // if an exception occurs while creating the object,
                // we do not need to call dispose on it and we don't want to decrease the counter
                // more than once (in case the exception is in a grandchild constructor)
                if (this['aria:objnumber']) {
                    __nbDestructions++;
                    __objects[this['aria:objnumber']] = null;
                    delete __objects[this['aria:objnumber']];
                    this['aria:objnumber'] = null;
                }
                throw e;
            }
        };
    }
1345775
function f_Constructor(ins_o) {
    var self = this;

    // Sanitize instance options
    if (!ins_o || typeof ins_o !== 'object') {
      ins_o = {};
    }
    if (!ins_o.custom_data || typeof ins_o.custom_data !== 'object') {
      ins_o.custom_data = {};
    }

    // Apply instance modules and properties
    for (var module_name in f_instance_modules) {
      /* istanbul ignore else  */
      if (f_instance_modules.hasOwnProperty(module_name)) {
        self['f_' + module_name] = f_instance_modules[module_name];
      }
    }

    // Apply instance options
    // Create data namespace, store name as f_data_namespace
    var data_namespace = con_o.data_namespace ||
      ins_o.data_namespace || 'data';
    self[data_namespace] = ins_o.custom_data;
    self.f_data_namespace = data_namespace;

    /** @TODO write desc for f_function_flow */
    self.f_function_flow = [];

    for (var property_name in f_instance_properties) {
      /* istanbul ignore else  */
      if (f_instance_properties.hasOwnProperty(property_name)) {
        self['f_' + property_name] = f_instance_properties[property_name];
      }
    }

    // Create instance function_flow, this in order to track tries
    con_o.function_flow.forEach(function (flow) {
      var new_flow_object = { tries: 0 };
      for (var property in flow) {
        /* istanbul ignore else  */
        if (flow.hasOwnProperty(property)) {
          if (property !== 'function') {
            new_flow_object[property] = flow[property];
          }
        }
      }
      self.f_function_flow.push(new_flow_object);
    });

    // Finaly, call user specified initializer and pass the instance options
    // custom data as the first argument
    if (con_o.initializer) {
      con_o.initializer.apply(self, [ins_o.custom_data]);
    }
  }
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));
}