Recursively loads objects into any of the rawOptions that represent
a class
551616
protected function loadChildClasses()
    {
        foreach ($this->rawOptions as &$option) {
            if (is_array($option)
                && array_key_exists('class', $option)
                && class_exists($option['class'])
            ) {
                $classLoader = new ClassLoader($option);
                $option = $classLoader->load();
            }
        }
    }
683647
def dynamic_options(obj)
      view_methods.each do |meth|
        if obj.class.ancestors.map {|e| e.to_s }.include?(method_to_class(meth))
          begin
            return send(meth, obj)
          rescue
            raise "View failed to generate for '#{method_to_class(meth)}' "+
              "while in '#{meth}' with error:\n#{$!.message}"
          end
        end
      end
      nil
    end
1208953
def options(cls):
        """"""
        return {k: v for k, v in cls.__dict__.items() if isinstance(v, Option)}
1170314
def runtime_import(object_path):
    """"""
    obj_module, obj_element = object_path.rsplit(".", 1)
    loader = __import__(obj_module, globals(), locals(), [str(obj_element)])
    return getattr(loader, obj_element)
892734
def __find_object_children(self, obj) -> dict:
        
        if hasattr(obj, 'items') and \
                isinstance(obj.items, types.BuiltinFunctionType):
            return self.__construct_object(obj)
        elif isinstance(obj, (list, tuple, set)):
            return self.__construct_list(obj)
        else:
            exclude_list = []
            if hasattr(obj, '_sa_instance_state'):
                # load only deferred objects
                if len(orm.attributes.instance_state(obj).unloaded) > 0:
                    mapper = inspect(obj)
                    for column in mapper.attrs:
                        column.key
                        column.value
            if hasattr(obj, 'json_exclude_list'):
                # do not serialize any values in this list
                exclude_list = obj.json_exclude_list
            return self.__construct_object(vars(obj), exclude_list)
        return None
905347
def filter(self, cls, recursive=False):
        
        source = self.walk_preorder if recursive else self._children
        return [
            codeobj
            for codeobj in source()
            if isinstance(codeobj, cls)
        ]
973692
private static Class _loadClass(ClassLoading cl, String className, Class defaultValue, Set<Throwable> exceptions) {
	className = className.trim();
	if (StringUtil.isEmpty(className)) return defaultValue;

	Class clazz = checkPrimaryTypesBytecodeDef(className, null);
	if (clazz != null) return clazz;

	// array in the format boolean[] or java.lang.String[]
	if (className.endsWith("[]")) {

	    StringBuilder pureCN = new StringBuilder(className);
	    int dimensions = 0;
	    do {
		pureCN.delete(pureCN.length() - 2, pureCN.length());
		dimensions++;
	    }
	    while (pureCN.lastIndexOf("[]") == pureCN.length() - 2);

	    clazz = __loadClass(cl, pureCN.toString(), null, exceptions);

	    if (clazz != null) {

		for (int i = 0; i < dimensions; i++)
		    clazz = toArrayClass(clazz);
		return clazz;
	    }
	}

	// array in the format [C or [Ljava.lang.String;
	else if (className.charAt(0) == '[') {

	    StringBuilder pureCN = new StringBuilder(className);
	    int dimensions = 0;

	    do {
		pureCN.delete(0, 1);
		dimensions++;
	    }
	    while (pureCN.charAt(0) == '[');

	    clazz = __loadClass(cl, pureCN.toString(), null, exceptions);
	    if (clazz != null) {
		for (int i = 0; i < dimensions; i++)
		    clazz = toArrayClass(clazz);
		return clazz;
	    }
	}
	return __loadClass(cl, className, defaultValue, exceptions);
    }
154251
def from_raw(self, rval: RawList, jptr: JSONPointer = "") -> ArrayValue:
        """"""
        if not isinstance(rval, list):
            raise RawTypeError(jptr, "array")
        res = ArrayValue()
        i = 0
        for en in rval:
            i += 1
            res.append(self.entry_from_raw(en, f"{jptr}/{i}"))
        return res
1087371
private void loadAllInstances(ZooClassProxy def, boolean subClasses, 
			MergingIterator<ZooPC> iter, boolean loadFromCache) {
		for (Node n: nodes) {
			iter.add(n.loadAllInstances(def, loadFromCache));
		}
		
		if (subClasses) {
			for (ZooClassProxy sub: def.getSubProxies()) {
				loadAllInstances(sub, true, iter, loadFromCache);
			}
		}
	}
226706
function interpolatedOptions(options, context, source, hierarchy = '') {
            Object.keys(options).forEach((key) => {
              if (typeof options[key] === 'object') {
                interpolatedOptions(options[key], context, source, `${hierarchy}.${key}`);
              }
              else if (typeof options[key] === 'string' && shouldPatchProperty(`${hierarchy}.${key}`)) {
                options[key] = utils.interpolateName(context, options[key], { content: source });
              }
            });
            return options;
          }
397166
def loads(s, as_dict=False, *args, **kwargs):
    
    if as_dict or (not isinstance(s, six.string_types)):
        s = json.dumps(s)
    kwargs['object_hook'] = object_hook
    return json.loads(s, *args, **kwargs)
1089902
function preprocessRawResults(rawResults, resolvedConfig) {
    rawResults.forEach((rawResult, resultId) => {
        if (!rawResult.attributePath) return; // e.g. sub-filter results don't need indexing

        // link resultIds into attribute tree (per DataSource):
        const attrNode = getAttribute(rawResult.attributePath, resolvedConfig);
        attrNode.dataSources[rawResult.dataSourceName].resultId = resultId;

        // index rows by childKey if available
        // (top-level result has no childKey and does not need to be indexed):
        if (rawResult.childKey) {
            const keyAttr = rawResult.childKey.length === 1 ? rawResult.childKey[0] : null;
            rawResult.indexedData = {};
            rawResult.data.forEach((row, i) => {
                function dereferenceKeyAttr(keyAttrib) {
                    const keyVal = row[keyAttrib];
                    if (keyVal === undefined) {
                        const attrPath =
                            rawResult.attributePath.length > 0 ? rawResult.attributePath.join('.') : '{root}';
                        throw new DataError(
                            `Result-row ${i} of "${attrPath}" (DataSource "${
                                rawResult.dataSourceName
                            }") misses child key attribute "${keyAttr}"`
                        );
                    }
                    return keyVal;
                }

                const key = keyAttr
                    ? '' + dereferenceKeyAttr(keyAttr) // speed up non-composite keys
                    : rawResult.childKey.map(dereferenceKeyAttr).join(keySeparator);

                if (!rawResult.uniqueChildKey) {
                    if (!rawResult.indexedData[key]) rawResult.indexedData[key] = [];
                    rawResult.indexedData[key].push(row);
                } else {
                    if (rawResult.indexedData[key]) {
                        const attrPath =
                            rawResult.attributePath.length > 0 ? rawResult.attributePath.join('.') : '{root}';
                        throw new DataError(
                            `Result-row ${i} of "${attrPath}" (DataSource "${
                                rawResult.dataSourceName
                            }") has duplicate child key "${key}"`
                        );
                    }
                    rawResult.indexedData[key] = row;
                }
            });
        }
    });
}
420613
def get_all_fields(cls, class_obj=None, fields=None):
        

        def return_fields(obj):

            internal_fields = fields
            if internal_fields is None:
                internal_fields = {}

            for attribute in dir(obj):

                try:
                    attr_val = getattr(obj, attribute)
                    attr_cls = attr_val.__class__

                    # If it is a model field, call on init
                    if issubclass(attr_cls, ModelField):
                        internal_fields[attribute] = attr_val
                except:
                    pass

            return internal_fields

        if class_obj is None:
            class_obj = cls

            fields = return_fields(class_obj)
            for parent_class in cls.__bases__:
                parent_fields = cls.get_all_fields(parent_class, fields)
                for field_name, field_value in list(parent_fields.items()):
                    if not field_name in fields:
                        fields[field_name] = field_value

            return fields

        else:
            if not isinstance(class_obj, CollectionModel):
                return fields
28912
def load_all(self, key, default=None):
        '''
        
        '''
        value = getattr(self, key)
        if default is not None:
            def loader(path): return self.load_path_with_default(path, default)
        else:
            loader = self.load_path
        if isinstance(value, dict):
            return {key: loader(value) for key, value in value.items()}
        elif isinstance(value, list):
            return [loader(value) for value in value]
        else:
            raise ValueError('load_all must be list or dict')
681797
def initialize_options(cls):
        
        cls.CONFIG_OPTIONS = cls.CFG.get(cls.CONFIG_PATH, return_type=dict)
1245639
def load_from_object(self, object_name):
        
        for key in dir(object_name):
            if key.isupper():
                self[key] = getattr(object_name, key)
163922
function(class_datas) {

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

			this.loadClass(class_datas[i]);

		}

	}