Inspects Ext.define() and copies detected properties over to the given cls Hash
512140
function detect_ext_define(cls, ast) {
  // defaults
  cls["extends"] = "Ext.Base";
  cls["requires"] = [];
  cls["uses"] = [];
  cls["alternateClassNames"] = [];
  cls["mixins"] = [];
  cls["aliases"] = [];
  cls["members"] = [];
  cls["code_type"] = "ext_define";
  
  each_pair_in_object_expression(ast["arguments"][1], function(key, value, pair) {
    switch (key) {
     case "extend":
        cls["extends"] = make_string(value);
        break;
     case "override":
        cls["override"] = make_string(value);
        break;
     case "requires":
        cls["requires"] = make_string_list(value);
        break;
     case "uses":
        cls["uses"] = make_string_list(value);
        break;
     case "alternateClassName":
        cls["alternateClassNames"] = make_string_list(value);
        break;
     case "mixins":
        cls["mixins"] = make_mixins(value);
        break;
     case "singleton":
        cls["singleton"] = make_singleton(value);
        break;
     case "alias":
        cls["aliases"] += make_string_list(value);
        break;
     case "see":
        cls["see"] += make_string_list(value);
        break;
     case "xtype":
        cls["aliases"] += _.map(make_string_list(value), function(xtype) { return "widget."+xtype });
        break;
     case "config":
        cls["members"] += make_configs(value, {"accessor": true});
        break;
     case "cachedConfig":
        cls["members"] += make_configs(value, {"accessor": true});
        break;
     case "eventedConfig":
        cls["members"] += make_configs(value, {"accessor": true, "evented": true});
        break;
     case "statics":
        cls["members"] += make_statics(value);
        break;
     case "inheritableStatics":
        cls["members"] += make_statics(value, {"inheritable": true});
        break;
     default:
        detect_method_or_property(cls, key, value, pair);
        break;
    }
  });
}
995666
def define_writer!(k, definition)
      define_method("#{k}=") do |value|
        # Recursively convert hash and array of hash to schematized objects
        value = ensure_schema value, definition[:schema]

        # Initial value
        instance_variable_set "@#{k}", value

        # Dirty tracking
        self.changed_attributes ||= Set.new
        self.changed_attributes << k
      end
    end
102699
def _class_defining_method(meth):  # pragma: no cover
    '''
    '''
    if inspect.ismethod(meth):
        for cls in inspect.getmro(meth.__self__.__class__):
            if cls.__dict__.get(meth.__name__) is meth:
                return '{}.{}'.format(cls.__module__, cls.__name__)
        meth = meth.__func__
    if inspect.isfunction(meth):
        module = meth.__qualname__.split('.<locals>', 1)[0]
        cls = getattr(inspect.getmodule(meth), module.rsplit('.', 1)[0])
        if isinstance(cls, type):
            return '{}.{}'.format(cls.__module__, cls.__name__)
19819
function inspectInstance(target, cache) {
        // If browser has no define property it means it is too old and
        // in that case we return the target itself.
        // This could be improved but I think it does not worth the trouble
        if (!hasDefineProperty) {
            return target;
        }

        var def,
            simpleConstructor,
            methodsCache,
            propertiesCache,
            obj,
            tmp,
            key;

        obj = fetchCache(target, cache.instances);
        if (obj) {
            return obj;
        }

        def = target.$static[$class];
        simpleConstructor = def.simpleConstructor;
        methodsCache = target[cacheKeyword].methods;
        propertiesCache = target[cacheKeyword].properties;

        obj = createObject(simpleConstructor.prototype);
        cache.instances.push({ target: target, inspect: obj });

        // Methods
        for (key in target[redefinedCacheKeyword].methods) {
            obj[key] = inspect(methodsCache[key], cache, true);
        }

        // Properties
        for (key in target[redefinedCacheKeyword].properties) {
            tmp = hasOwn(propertiesCache, key) ? propertiesCache[key] : target[key];
            obj[key] = inspect(tmp, cache, true);
        }

        // Handle undeclared properties
        methodsCache = def.methods;
        propertiesCache = def.properties;
        for (key in target) {
            if (hasOwn(target, key) && !hasOwn(obj, key) && !propertiesCache[key] && !methodsCache[key]) {
                obj[key] = inspect(target[key], cache, true);
            }
        }

        // Fix the .constructor
        tmp = obj.constructor.$constructor;
        while (tmp) {
            inspectConstructor(tmp, cache, true);
            tmp = tmp.$parent;
        }

        return obj;
    }
1367633
def inspect
      opts = options.reject { |k| %i[type name].include?(k) }
      meta_and_opts = meta.merge(opts).map { |k, v| "#{k}=#{v.inspect}" }
      %(#<#{self.class}[#{type.name}] name=#{name.inspect} #{meta_and_opts.join(' ')}>)
    end
600870
function nameSpacedDefine(nameSpace, id, deps, callback) {
  // only add name space for modules in user space
  // also skip any ext: plugin (a dumber-module-loader feature)
  if (currentSpace === userSpace && id.slice(0, 4) !== 'ext:') {
    const parsed = parse(id);
    userSpace.define(parsed.prefix + nameSpace + '/' + parsed.bareId, deps, callback);
  } else {
    currentSpace.define(id, deps, callback);
  }
}
822125
def custom_object_extension_prefix_lax(instance):
    
    for key, obj in instance['objects'].items():
        if not ('extensions' in obj and 'type' in obj and
                obj['type'] in enums.OBSERVABLE_EXTENSIONS):
            continue
        for ext_key in obj['extensions']:
            if (ext_key not in enums.OBSERVABLE_EXTENSIONS[obj['type']] and
                    not CUSTOM_TYPE_LAX_PREFIX_RE.match(ext_key)):
                yield JSONError("Custom Cyber Observable Object extension type"
                                " '%s' should start with 'x-'."
                                % ext_key, instance['id'],
                                'custom-prefix-lax')
1246039
def inspect
      expr = @expr || @unit.expr
      expr = (expr) ? ","+expr.inspect : ""
      sufx = (@@verbose_inspect) ? " "+@unit.inspect : ""
      self.class.to_s+"["+Unit::Utils.num_inspect(@value)+expr+"]"+sufx
    end
574944
def expand_definition(definition)
      return definition if definition.is_a? Hash
      definition.each_with_object({}) do |key, result|
        if key.is_a? String
          result[key] = :default
        elsif key.is_a? Hash
          result.merge!(expand_sub_definitions(key))
        end
      end
    end
918479
def hash_from_property(property, value)
      property.split(".").reverse.inject(value) { |value, item| { item => value } }
    end
249915
def inspect
      format INSPECT_FORMAT, name: self.class.name,
                             object_id: object_id,
                             params: params_with_types,
                             type: Value.canonicalize(@_value.class)
    end
241074
function(opts) {
	var opts = opts || {};
	var shouldHash = typeof opts.hash != 'undefined' ? opts.hash : defaults.hash;
	var prefix = _.flatten([defaults.prefix]);
	var shouldPrefix = typeof opts.shouldPrefix != 'undefined' ? opts.shouldPrefix : true;
	return through.obj(function(file, enc, cb) {
		var originalPath = file.path;

		// Get hash of contents
		var hash = md5(opts, file.contents.toString());

		// Construct new filename
		var ext = path.extname(file.path);
		var basePath = path.basename(file.path, ext);
		var filename = typeof hash !== 'undefined' ? basePath + '-' + hash + ext : basePath + ext;
		file.path = path.join(path.dirname(file.path), filename);

		// Add to manifest
		var base = path.join(file.cwd, defaults.src);
		var key = originalPath.replace(base, '');

		// @TODO: Instead of this it could use "glob" module to regex delete files
		// Check for existing value and whether cleanup is set
		var existing = manifest[key];
		if (existing && existing.src && defaults.cleanup) {
			// Delete the file
			fs.unlink(path.join(file.cwd, defaults.dest, existing.src));
		} else if (defaults.cleanup && shouldHash) {
			// Check if cleanup and hash enabled then we can remove any non hashed version from dest directory
			var nonHashPath = path.join(path.dirname(originalPath), basePath + ext).replace(base, '');
			var absPath = path.join(file.cwd, defaults.dest, nonHashPath);
			fs.exists(absPath, function(exists) {
				if (!exists) return;
				fs.unlink(absPath);
			});
		}

		var filePrefix = shouldPrefix ? prefix[index % prefix.length] : '';

		// Finally add new value to manifest
		var src = file.path.replace(base, '');
		manifest[key] = {
			index: index++,
			src: src,
			dest: filePrefix + src
		};

		// Write manifest file
		writeManifest();

		// Return and continue
		this.push(file);
		cb();
	});
}
835742
def define_hash_method
      keys = @keys
      define_method(:hash) do
        keys.map { |key| send(key) }.push(self.class).hash
      end
    end
190545
def inspect
      attrs = [
        [ :repository, repository.name ],
        [ :model,      model           ],
        [ :fields,     fields          ],
        [ :links,      links           ],
        [ :conditions, conditions      ],
        [ :order,      order           ],
        [ :limit,      limit           ],
        [ :offset,     offset          ],
        [ :reload,     reload?         ],
        [ :unique,     unique?         ],
      ]

      "#<#{self.class.name} #{attrs.map { |key, value| "@#{key}=#{value.inspect}" }.join(' ')}>"
    end
1196223
def _archive_cls(file, ext=''):
        
        cls = None
        filename = None
        if is_string(file):
            filename = file
        else:
            try:
                filename = file.name
            except AttributeError:
                raise UnrecognizedArchiveFormat(
                    "File object not a recognized archive format.")
        lookup_filename = filename + ext
        base, tail_ext = os.path.splitext(lookup_filename.lower())
        cls = extension_map.get(tail_ext)
        if not cls:
            base, ext = os.path.splitext(base)
            cls = extension_map.get(ext)
        if not cls:
            raise UnrecognizedArchiveFormat(
                "Path not a recognized archive format: %s" % filename)
        return cls
195644
private static Map<String, String> getIntrospectedProperties(String clz, URLClassLoader cl, PrintStream error)
   {
      Map<String, String> result = null;

      try
      {
         Class<?> c = Class.forName(clz, true, cl);

         result = new TreeMap<String, String>();

         Method[] methods = c.getMethods();

         for (Method m : methods)
         {
            if (m.getName().startsWith("set") && m.getParameterTypes().length == 1
                  && isValidType(m.getParameterTypes()[0]))
            {
               String name = m.getName().substring(3);

               if (name.length() == 1)
               {
                  name = name.toLowerCase(Locale.US);
               }
               else
               {
                  name = name.substring(0, 1).toLowerCase(Locale.US) + name.substring(1);
               }

               String type = m.getParameterTypes()[0].getName();

               result.put(name, type);
            }
         }
      }
      catch (Throwable t)
      {
         // Nothing we can do
         t.printStackTrace(error);
      }
      return result;
   }
915668
def pre_process(classes_hash, opts)
      Process::IgnoredClasses.new(classes_hash).process_all!
      Process::GlobalMembers.new(classes_hash, opts).process_all!
      Process::Accessors.new(classes_hash).process_all!
      Process::Ext4Events.new(classes_hash, opts).process_all!
      Process::Enums.new(classes_hash).process_all!
      Process::Overrides.new(classes_hash, opts).process_all!

      classes_hash.values
    end