Batch load exported classes. Constructors, references and skeletons can be provided as separate arrays
@param {Array.<_cClassData>} class_datas
163922
function(class_datas) {

		for (var i = 0, count = class_datas.length; i <count; i++) {

			this.loadClass(class_datas[i]);

		}

	}
997241
private void addClasses(Class<?>[] classes, HashSet<Class<?>> result){
		
		if(isNull(classes) || classes.length==0)	
			Error.globalClassesAbsent(configuredClass);
		
		for (Class<?> classe : classes)	result.add(classe);
	}
1253424
@PublicAPI(usage = ACCESS)
    public JavaClasses importClasses(Class<?>... classes) {
        return importClasses(Arrays.asList(classes));
    }
122687
private function loadResults($my_std_class)
    {
        if(property_exists($my_std_class->table,'row'))
        {
            foreach ($my_std_class->table->row as $row)
            {
                $this->result->push($this->convertToStdClass($row));
            }
        }

    }
667165
function batchLoaderFunc(graphqlType, serializeRecordKey, getRecords) {
  return keys => getRecords(keys)
    .then(resultArray => getResultsByKey(
      keys, extractAllItems(resultArray), serializeRecordKey, graphqlType,
      { onError: logger }
      )
    );
}
356268
function class_export( $classname, array $commentData = array() ){
		echo 
		"/**\n * Auto-generated file containing class $classname";
		foreach( $commentData as $tag => $value ){
			echo "\n * @$tag $value";
		}
		echo 
		"\n */\n",
		"\n",
		"import('PLUG.parsing.Grammar');\n",
		"\n",
		"/**\n * Auto-generated Grammar subclass";
		// unset page level doc block tags we don't want against the class
		unset (
			$commentData['author'], $commentData['version']
		);
		foreach( $commentData as $tag => $value ){
			echo "\n * @$tag $value";
		}
		echo 
		"\n */\n",
		"class $classname extends Grammar {\n",
		"\n";
		
		// overload all non-null members
		// no way to auto-detect access level ??
		$protected = get_object_vars($this);
		unset( $protected['uindex'] );
		foreach( $protected as $var => $val ){
			if( is_null($val) ){
				continue;
			}
			echo 
			"/** @override \${$var} */\n",
			"protected \${$var} = ",var_export($val,1),";\n\n";
		}
		// end vars
		echo
		"}\n";
	}
449335
def expand_classes_glob(classes, salt_data):
    '''
    
    '''
    all_classes = []
    expanded_classes = []
    saltclass_path = salt_data['path']

    for _class in classes:
        all_classes.extend(match_class_glob(_class, saltclass_path))

    for _class in all_classes:
        if _class not in expanded_classes:
            expanded_classes.append(_class)

    return expanded_classes
838395
function startClassInit(noDelay) {

			var script = scriptArr.pop(), data;

			var temp = getBaseDir(script.packageName);

			if (typeof loadedScript[temp  + script.Class] == 'object') {
				data = loadedScript[temp  + script.Class];
			}
			loadedScript[temp  + script.Class] = true;
			var temp;
			if(noDelay) {
				compiling_classes = compiling_classes || [];
				compiling_classes.push({script:script, data:data});
			}
			while(temp = compiling_classes.shift()){
				(function(temp){
					fileLoadeManager.onAllFileLoad(temp.script.includes, function(){
						classManager.init(temp.script, temp.data);
					});
				})(temp)
			}
			if(noDelay) {
				return;
			}
			compiling_classes = [];
			compiling_classes.push({script:script, data:data});
			setTimeout(function( ) {
				// Calling classManager after a short delay so that file get
				// completely ready.
				var temp;
				while(temp = compiling_classes.shift()){
					(function(temp){
						fileLoadeManager.onAllFileLoad(temp.script.includes, function(){
							classManager.init(temp.script, temp.data);
						});
					})(temp)
				}
				// fm.holdReady(false);
			}, 0);

		}
956093
def load(cls, data):
        
        if len(data) == 1:
            for key, value in data.items():
                if "__classname__" not in value:  # pragma: no cover
                    raise ValueError
                name = key
                bases = (Constant,)
                attrs = dict()
                for k, v in value.items():
                    if isinstance(v, dict):
                        if "__classname__" in v:
                            attrs[k] = cls.load({k: v})
                        else:
                            attrs[k] = v
                    else:
                        attrs[k] = v
            return type(name, bases, attrs)
        else:  # pragma: no cover
            raise ValueError
938659
def instantiate_from_data(self, object_data):
        
        if isinstance(object_data, dict) and 'name' in object_data:
            name = object_data['name']
            module = importlib.import_module(name)
            return self.resolve_and_call(module.create, extra_env=object_data)
        if isinstance(object_data, dict) and 'factory' in object_data:
            factory = object_data['factory']
            module = importlib.import_module(factory)
            params = self.resolve_parameters(module.create, extra_env=object_data)
            return GenericFactory(module.create, params)
        elif isinstance(object_data, dict):
            return {k: self.instantiate_from_data(v) for k, v in object_data.items()}
        elif isinstance(object_data, list):
            return [self.instantiate_from_data(x) for x in object_data]
        elif isinstance(object_data, Variable):
            return object_data.resolve(self.parameters)
        else:
            return object_data
54464
function loadClass(className) {
  var Class = Classes[className];

  if (Class !== undefined) {
    return Class;
  }

  // This uses a switch for static require analysis
  switch (className) {
    case 'Connection':
      Class = require('./lib/Connection');
      break;
    case 'ConnectionConfig':
      Class = require('./lib/ConnectionConfig');
      break;
    case 'Pool':
      Class = require('./lib/Pool');
      break;
    case 'PoolCluster':
      Class = require('./lib/PoolCluster');
      break;
    case 'PoolConfig':
      Class = require('./lib/PoolConfig');
      break;
    case 'SqlString':
      Class = require('./lib/protocol/SqlString');
      break;
    case 'Types':
      Class = require('./lib/protocol/constants/types');
      break;
    default:
      throw new Error('Cannot find class \'' + className + '\'');
  }

  // Store to prevent invoking require()
  Classes[className] = Class;

  return Class;
}
178982
function load(filename) {

  return function(cb) {
    var file = path.join(process.cwd(), filename)
      , json = require(file)
      , model = exports[json.table]
      , rows = json.rows;

    console.log('Loading', file);

    run();
    function run() {
      var row = rows.shift();
      if(row !== undefined) {
        model.create(row, function(err) {
          if(err) {
            cb(err);
          } else {
            run();
          }
        });
      } else {
        cb();
      }
    }
  };
}
270720
function () {
	          var _this = this;
	          var args = [];
	          for (var _i = 0; _i < arguments.length; _i++) {
	              args[_i - 0] = arguments[_i];
	          }
	          var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);
	          _classStmt.fields.forEach(function (field) { _this[field.name] = undefined; });
	          _executeFunctionStatements(ctorParamNames, args, _classStmt.constructorMethod.body, instanceCtx, _visitor);
	      }
990300
function (methods) {
    this.lazyLoaders();
    var loaders = this.loaders;
    var self = this;

    utils.arrayify(methods).forEach(function (method) {
      self.define(method, function() {
        return loaders[method].apply(loaders, arguments);
      });
    });
  }
37392
function loadFields(list, callback) {
  list.forEach(loadMethods)

  function loadMethods(field) {
    var module = require('./fields/' + field + '.js')
      , methods

    if (typeof module === 'function' || typeof module === 'string') {
      methods = {}
      methods[field] = module
    }
    else {
      methods = module
    }

    callback(methods)
  }
}
320195
def ArrayOf(klass, fixed_length=None, prototype=None):
    """"""
    global _array_of_map
    global _array_of_classes, _sequence_of_classes

    # check the parameters for consistency
    if issubclass(klass, Atomic):
        if prototype is None:
            pass
        elif not klass.is_valid(prototype):
            raise ValueError("prototype %r not valid for %s" % (prototype, klass.__name__))
    else:
        if prototype is None:
            ### TODO This should be an error, a prototype should always be
            ### required for non-atomic types, even if it's only klass()
            ### for a default object which will be deep copied
            pass
        elif not isinstance(prototype, klass):
            raise ValueError("prototype %r not valid for %s" % (prototype, klass.__name__))

    # build a signature of the parameters
    array_signature = (klass, fixed_length, prototype)

    # if this has already been built, return the cached one
    if array_signature in _array_of_map:
        return _array_of_map[array_signature]

    # no ArrayOf(ArrayOf(...)) allowed
    if klass in _array_of_classes:
        raise TypeError("nested arrays disallowed")
    # no ArrayOf(SequenceOf(...)) allowed
    if klass in _sequence_of_classes:
        raise TypeError("arrays of SequenceOf disallowed")

    # define a generic class for arrays
    @bacpypes_debugging
    class ArrayOf(Array):

        subtype = None
        fixed_length = None
        prototype = None

        def __init__(self, value=None):
            if value is None:
                self.value = [0]
                if self.fixed_length is not None:
                    self.fix_length(self.fixed_length)

            elif isinstance(value, list):
                if (self.fixed_length is not None) and (len(value) != self.fixed_length):
                    raise ValueError("invalid array length")

                self.value = [len(value)]
                self.value.extend(value)
            else:
                raise TypeError("invalid constructor datatype")

        def fix_length(self, new_length):
            if len(self.value) > new_length + 1:
                # trim off the excess
                del self.value[new_length + 1:]
            elif len(self.value) < new_length + 1:
                # how many do we need
                element_count = new_length - len(self.value) + 1

                # extend or append
                if issubclass(self.subtype, Atomic):
                    if self.prototype is None:
                        extend_value = self.subtype().value
                    else:
                        extend_value = self.prototype
                    self.value.extend( [extend_value] * element_count )
                else:
                    for i in range(element_count):
                        if self.prototype is None:
                            append_value = self.subtype()
                        else:
                            append_value = _deepcopy(self.prototype)
                        self.value.append(append_value)

            self.value[0] = new_length

        def append(self, value):
            if self.fixed_length is not None:
                raise TypeError("fixed length array")

            if issubclass(self.subtype, Atomic):
                pass
            elif issubclass(self.subtype, AnyAtomic) and not isinstance(value, Atomic):
                raise TypeError("instance of an atomic type required")
            elif not isinstance(value, self.subtype):
                raise TypeError("%s value required" % (self.subtype.__name__,))

            self.value.append(value)
            self.value[0] = len(self.value) - 1

        def __len__(self):
            return self.value[0]

        def __getitem__(self, item):
            # no wrapping index
            if (item < 0) or (item > self.value[0]):
                raise IndexError("index out of range")

            return self.value[item]

        def __setitem__(self, item, value):
            # no wrapping index
            if (item < 0) or (item > self.value[0]):
                raise IndexError("index out of range")

            # special length handling for index 0
            if item == 0:
                if (self.fixed_length is not None):
                    if (value != self.value[0]):
                        raise TypeError("fixed length array")
                    return

                self.fix_length(value)
            else:
                self.value[item] = value

        def __delitem__(self, item):
            if self.fixed_length is not None:
                raise TypeError("fixed length array")

            # no wrapping index
            if (item < 1) or (item > self.value[0]):
                raise IndexError("index out of range")

            # delete the item and update the length
            del self.value[item]
            self.value[0] -= 1

        def __iter__(self):
            return iter(self.value[1:])

        def index(self, value):
            # only search through values
            for i in range(1, self.value[0] + 1):
                if value == self.value[i]:
                    return i

            # not found
            raise ValueError("%r not in array" % (value,))

        def remove(self, item):
            if self.fixed_length is not None:
                raise TypeError("fixed length array")

            # find the index of the item and delete it
            indx = self.index(item)
            self.__delitem__(indx)

        def encode(self, taglist):
            if _debug: ArrayOf._debug("(%r)encode %r", self.__class__.__name__, taglist)

            for value in self.value[1:]:
                if issubclass(self.subtype, (Atomic, AnyAtomic)):
                    # a helper cooperates between the atomic value and the tag
                    helper = self.subtype(value)

                    # build a tag and encode the data into it
                    tag = Tag()
                    helper.encode(tag)

                    # now encode the tag
                    taglist.append(tag)
                elif isinstance(value, self.subtype):
                    # it must have its own encoder
                    value.encode(taglist)
                else:
                    raise TypeError("%s must be a %s" % (value, self.subtype.__name__))

        def decode(self, taglist):
            if _debug: ArrayOf._debug("(%r)decode %r", self.__class__.__name__, taglist)

            # start with an empty array
            new_value = []

            while len(taglist) != 0:
                tag = taglist.Peek()
                if tag.tagClass == Tag.closingTagClass:
                    break

                if issubclass(self.subtype, (Atomic, AnyAtomic)):
                    if _debug: ArrayOf._debug("    - building helper: %r %r", self.subtype, tag)
                    taglist.Pop()

                    # a helper cooperates between the atomic value and the tag
                    helper = self.subtype(tag)

                    # save the value
                    new_value.append(helper.value)
                else:
                    if _debug: ArrayOf._debug("    - building value: %r", self.subtype)
                    # build an element
                    value = self.subtype()

                    # let it decode itself
                    value.decode(taglist)

                    # save what was built
                    new_value.append(value)

            # check the length
            if self.fixed_length is not None:
                if self.fixed_length != len(new_value):
                    raise ValueError("invalid array length")

            # update the length
            self.value = [len(new_value)] + new_value

        def encode_item(self, item, taglist):
            if _debug: ArrayOf._debug("(%r)encode_item %r %r", self.__class__.__name__, item, taglist)

            if item == 0:
                # a helper cooperates between the atomic value and the tag
                helper = Unsigned(self.value[0])

                # build a tag and encode the data into it
                tag = Tag()
                helper.encode(tag)

                # now encode the tag
                taglist.append(tag)
            else:
                value = self.value[item]

                if issubclass(self.subtype, (Atomic, AnyAtomic)):
                    # a helper cooperates between the atomic value and the tag
                    helper = self.subtype(self.value[item])

                    # build a tag and encode the data into it
                    tag = Tag()
                    helper.encode(tag)

                    # now encode the tag
                    taglist.append(tag)
                elif isinstance(value, self.subtype):
                    # it must have its own encoder
                    value.encode(taglist)
                else:
                    raise TypeError("%s must be a %s" % (value, self.subtype.__name__))

        def decode_item(self, item, taglist):
            if _debug: ArrayOf._debug("(%r)decode_item %r %r", self.__class__.__name__, item, taglist)

            if item == 0:
                # a helper cooperates between the atomic value and the tag
                helper = Unsigned(taglist.Pop())

                # save the value
                self.value = helper.value
            elif issubclass(self.subtype, (Atomic, AnyAtomic)):
                if _debug: ArrayOf._debug("    - building helper: %r", self.subtype)

                # a helper cooperates between the atomic value and the tag
                helper = self.subtype(taglist.Pop())

                # save the value
                self.value = helper.value
            else:
                if _debug: ArrayOf._debug("    - building value: %r", self.subtype)
                # build an element
                value = self.subtype()

                # let it decode itself
                value.decode(taglist)

                # save what was built
                self.value = value

        def debug_contents(self, indent=1, file=sys.stdout, _ids=None):
            try:
                value_list = enumerate(self.value)
            except TypeError:
                file.write("%s(non-sequence) %r\n" % ("    " * indent, self.value))
                return

            for i, value in value_list:
                if i == 0:
                    file.write("%slength = %d\n" % ("    " * indent, value))
                elif issubclass(self.subtype, (Atomic, AnyAtomic)):
                    file.write("%s[%d] = %r\n" % ("    " * indent, i, value))
                elif isinstance(value, self.subtype):
                    file.write("%s[%d]\n" % ("    " * indent, i))
                    value.debug_contents(indent+1, file, _ids)
                else:
                    file.write("%s%s must be a %s" % ("    " * indent, value, self.subtype.__name__))

        def dict_contents(self, use_dict=None, as_class=dict):
            # return arrays as arrays
            mapped_value = []

            for value in self.value:
                if issubclass(self.subtype, Atomic):
                    mapped_value.append(value)              ### ambiguous
                elif issubclass(self.subtype, AnyAtomic):
                    mapped_value.append(value.value)        ### ambiguous
                elif isinstance(value, self.subtype):
                    mapped_value.append(value.dict_contents(as_class=as_class))

            # return what we built
            return mapped_value

    # constrain it to a list of a specific type of item
    setattr(ArrayOf, 'subtype', klass)
    setattr(ArrayOf, 'fixed_length', fixed_length)
    setattr(ArrayOf, 'prototype', prototype)

    # update the name
    ArrayOf.__name__ = 'ArrayOf' + klass.__name__

    # cache this type
    _array_of_map[array_signature] = ArrayOf
    _array_of_classes[ArrayOf] = 1

    # return this new type
    return ArrayOf
423614
static function load($class_name, $object_id, $version)
	{
		static $cache = array();
		$hash = '__load:'.$class_name.'-'.$object_id.'-'.$version;
		if(!empty($cache[$hash]))
			return $cache[$hash];

		$object = bors_load($class_name, $object_id);
//		echo $object;
		foreach(bors_find_all(__CLASS__, array(
			'target_class_name' => $class_name,
			'target_id' => $object_id,
			'target_version' => $version,
		)) as $x)
		{
//			echo "{$x->property_name()} = {$x->value()}<br/>\n";
			$object->set_attr('versioning_properties',
				array_merge(
					$object->attr('versioning_properties', array()),
					array($x->property_name() => $object->get($x->property_name()))
				)
			);

			$object->set($x->property_name(), $x->value(), false);
//			$object->set_attr('versioning_property', $x->property_name());
		}

		return $cache[$hash] = $object;
	}