Replaces `super` with `Super.Class` if in a static class method with a qname superclass
549996
private void tryReplaceSuper(Node superNode) {
    checkState(!superclasses.isEmpty(), "`super` cannot appear outside a function");
    Optional<Node> currentSuperclass = superclasses.peek();
    if (!currentSuperclass.isPresent() || !currentSuperclass.get().isQualifiedName()) {
      // either if a) we're in a static class fn without an 'extends' clause or b) we're not in
      // a static class function
      return;
    }

    Node fullyQualifiedSuperRef = currentSuperclass.get().cloneTree();
    superNode.replaceWith(fullyQualifiedSuperRef);
    compiler.reportChangeToEnclosingScope(fullyQualifiedSuperRef);
  }
560887
def replace(
        self,
        name=_void,
        kind=_void,
        annotation=_void,
        default=_void,
        _partial_kwarg=_void,
    ):
        """"""

        if name is _void:
            name = self._name

        if kind is _void:
            kind = self._kind

        if annotation is _void:
            annotation = self._annotation

        if default is _void:
            default = self._default

        if _partial_kwarg is _void:
            _partial_kwarg = self._partial_kwarg

        return type(self)(
            name,
            kind,
            default=default,
            annotation=annotation,
            _partial_kwarg=_partial_kwarg,
        )
475753
public static String canonicalizeClassName( String name )
    {
        String classname = name;
        if ( classname.startsWith("modules/"))
            classname = classname.replaceFirst("^modules/[^/]+/", "");
        classname = classname.replaceAll("[/\\\\]", ".");
        if ( classname.startsWith(".") )
            classname = classname.substring(1);
        if ( classname.startsWith("class ") )
            classname = classname.substring(6);
        if ( classname.startsWith("classes.") )
            classname = classname.substring(8);
        if ( classname.endsWith(".class") )
            classname = classname.replaceFirst("\\.[^\\.]+$", "");
        return classname;
    }
209359
def resolve_method( m_name )
      raise "resolve_method #{m_name}.#{m_name.class}" unless m_name.is_a?(Symbol)
      method = get_instance_method(m_name)
      return method if method
      if( super_class_name && super_class_name != :Object )
        method = self.super_class.resolve_method(m_name)
      end
      method
    end
750070
def method_missing(sym,*args,&block)
      name = sym.to_s

      unless block
        if (name =~ /=$/ && args.length == 1)
          return self[name.chop.to_sym] = args.first
        elsif args.empty?
          return self[sym]
        end
      end

      return super(sym,*args,&block)
    end
75738
public void addHierarchy(String superclass, String[] packages) {
    List<String> 	names;
    List<Class>		classes;
    String[]		patterns;
    int			i;
    Pattern		p;
    ClassLocator	locator;

    locator    = getClassLocator();
    names      = locator.findNames(superclass, packages);
    classes    = locator.findClasses(superclass, packages);
    // remove blacklisted classes
    if (m_Blacklist.containsKey(superclass)) {
      try {
        patterns = m_Blacklist.getProperty(superclass).replaceAll(" ", "").split(",");
        for (String pattern: patterns) {
          p = Pattern.compile(pattern);
          // names
          i = 0;
          while (i < names.size()) {
            if (p.matcher(names.get(i)).matches())
              names.remove(i);
            else
              i++;
          }
          // classes
          i = 0;
          while (i < classes.size()) {
            if (p.matcher(classes.get(i).getName()).matches())
              classes.remove(i);
            else
              i++;
          }
        }
      }
      catch (Exception ex) {
        getLogger().log(Level.SEVERE, "Failed to blacklist classes for superclass '" +  superclass + "':", ex);
      }
    }
    // create class list
    updateClassnames(m_CacheNames, superclass, new HashSet<>(names));
    updateClassnames(m_ListNames, superclass, new ArrayList<>(names));
    updateClasses(m_CacheClasses, superclass, new HashSet<>(classes));
    updateClasses(m_ListClasses, superclass, new ArrayList<>(classes));
  }
1303255
function _super(methodName, args) {
	// Keep track of how far up the prototype chain we have traversed,
	// in order to handle nested calls to _super.
	if (this._superCallObjects === undefined) { this._superCallObjects = {}; }
	var oldSuperCallback = this._superCallObjects[methodName],
		currentObject = oldSuperCallback || this,
		parentObject  = findSuper(methodName, currentObject),
		result;
	this._superCallObjects[methodName] = parentObject;

	try {
		result = parentObject[methodName].apply(this, args || []);
	} finally {
		if (oldSuperCallback) {
			this._superCallObjects[methodName] = oldSuperCallback;
		} else {
			delete this._superCallObjects[methodName];
		}
	}
	return result;
}
767409
def _update_class(self, oldclass, newclass):
        """"""
        olddict = oldclass.__dict__
        newdict = newclass.__dict__

        oldnames = set(olddict)
        newnames = set(newdict)

        for name in newnames - oldnames:
            setattr(oldclass, name, newdict[name])
            notify_info0('Added:', name, 'to', oldclass)
            self.found_change = True

        # Note: not removing old things...
        # for name in oldnames - newnames:
        #    notify_info('Removed:', name, 'from', oldclass)
        #    delattr(oldclass, name)

        for name in (oldnames & newnames) - set(['__dict__', '__doc__']):
            self._update(oldclass, name, olddict[name], newdict[name], is_class_namespace=True)

        old_bases = getattr(oldclass, '__bases__', None)
        new_bases = getattr(newclass, '__bases__', None)
        if str(old_bases) != str(new_bases):
            notify_error('Changing the hierarchy of a class is not supported. %s may be inconsistent.' % (oldclass,))

        self._handle_namespace(oldclass, is_class_namespace=True)
307599
private static void getLocalAndInheritedMethods(
      PackageElement pkg, TypeElement type, SetMultimap<String, ExecutableElement> methods) {
    for (TypeMirror superInterface : type.getInterfaces()) {
      getLocalAndInheritedMethods(pkg, MoreTypes.asTypeElement(superInterface), methods);
    }
    if (type.getSuperclass().getKind() != TypeKind.NONE) {
      // Visit the superclass after superinterfaces so we will always see the implementation of a
      // method after any interfaces that declared it.
      getLocalAndInheritedMethods(pkg, MoreTypes.asTypeElement(type.getSuperclass()), methods);
    }
    for (ExecutableElement method : ElementFilter.methodsIn(type.getEnclosedElements())) {
      if (!method.getModifiers().contains(Modifier.STATIC)
          && methodVisibleFromPackage(method, pkg)) {
        methods.put(method.getSimpleName().toString(), method);
      }
    }
  }
774473
def use_kwargs(self, *args, **kwargs) -> typing.Callable:
        
        return super().use_kwargs(*args, **kwargs)
100231
def classFactory(iface):
    """"""
    # Try to import submodule to check if there are present.
    try:
        from parameters.generic_parameter import GenericParameter
    except ImportError:
        # Don't use safe.utilities.i18n.tr as we need to be outside of `safe`.
        # Some safe functions will import safe_extras.parameters
        QMessageBox.warning(
            None,
            QCoreApplication.translate(
                '@default', 'InaSAFE submodule not found'),
            QCoreApplication.translate(
                '@default',
                'InaSAFE could not find the submodule "parameters". '
                'You should do "git submodule update" or if you need a new '
                'clone, do "git clone --recursive git@github.com:inasafe/'
                'inasafe.git". If this is already a new clone, you should '
                'do "git submodule init" before "git submodule update".'
                'Finally, restart QGIS.'))

    from .safe.plugin import Plugin
    return Plugin(iface)
989013
def _list_superclasses(class_def):
    """"""
    superclasses = class_def.get('superClasses', [])
    if superclasses:
        # Make sure to duplicate the list
        return list(superclasses)

    sup = class_def.get('superClass', None)
    if sup:
        return [sup]
    else:
        return []
441231
function() {
       if ($caller !== null) {
            for(var $s = $caller.boundTo.$parent; $s !== null; $s = $s.$parent) {
                var m = $s.prototype[$caller.methodName];
                if (m !== undefined) {
                    return m.apply(this, arguments);
                }
            }
        } else {
            throw new Error("$super is called outside of class context");
        }
    }
537019
def method_missing(method_id, *arguments, &block)#:nodoc:

      # If the missing method is  XXX_without_static_rc, define XXX
      # using the superclass ActiveRecord::Base method_missing then
      # Finally, alias chain it to XXX_with_static_rc
      if ((match = method_id.to_s.match(/(.*)_without_static_rc$/)) &&
          (base_method_id = match[1]))
        begin
          return super(base_method_id, *arguments, &block)
        ensure
          define_static_rc_alias(base_method_id)
        end
      end

      # If the missing method is a finder like find_by_name
      # Define on the class then invoke find_by_name_with_static_rc
      if match = ActiveRecord::DynamicFinderMatch.match(method_id)
        attribute_names = match.attribute_names
        if all_attributes_exists?(attribute_names) &&  match.finder?
          attributes = construct_attributes_from_arguments(attribute_names, arguments)
          method_name = define_static_record_finder_method(method_id, match.finder, match.bang?, attributes)
          return self.send method_name, *arguments
        end
      end

      #If nothing matches, invoke the super
      super(method_id, *arguments, &block)
    end
1235435
function replaceSuperMethodCall(node, state, path, options) {
  // like super.foo()
  console.assert(node.type === "CallExpression");
  console.assert(node.callee.object.type === "Super");

  return funcCall(
            member(
              funcCall(
                member(options.functionNode, "_get"),
                replaceSuper(node.callee.object, state, path.concat(["callee", "object"]), options),
                literal(node.callee.property.value || node.callee.property.name),
                id("this")),
                "call"),
            id("this"), ...node.arguments);
}
1028664
def uses_super(func):
    
    if isinstance(func, property):
        return any(uses_super(f) for f in (func.fget, func.fset, func.fdel) if f)
    elif isinstance(func, (staticmethod, classmethod)):
        if sys.version_info >= (2, 7):
            func = func.__func__
        elif isinstance(func, staticmethod):
            func = func.__get__(True)
        else: # classmethod
            func = func.__get__(True).im_func
    if sys.version_info[0] >= 3:
        return 'super' in func.__code__.co_names
    return 'super' in func.func_code.co_names
354903
def type
            name = (self.class.name or self.class.superclass.name or self.native_type.name)

            name.split("::").last.to_sym
        end