Returns the super class constructor for the given class, if it is an
instance of the PropertiesMixin.

@param {!PropertiesMixinConstructor} constructor PropertiesMixin constructor
@return {PropertiesMixinConstructor} Super class constructor
964301
function superPropertiesClass(constructor) {
   const superCtor = Object.getPrototypeOf(constructor);

   // Note, the `PropertiesMixin` class below only refers to the class
   // generated by this call to the mixin; the instanceof test only works
   // because the mixin is deduped and guaranteed only to apply once, hence
   // all constructors in a proto chain will see the same `PropertiesMixin`
   return (superCtor.prototype instanceof PropertiesMixin) ?
     /** @type {PropertiesMixinConstructor} */ (superCtor) : null;
 }
1005322
private static Constructor<?> createImpl(Class<?> cl,
                                           ClassLoader loader)
  {
    /**
    if (! Modifier.isAbstract(cl.getModifiers())) {
      throw new IllegalArgumentException();
    }
    */
    
    ClassGeneratorVault<?> generator
      = new ClassGeneratorVault<>(cl, loader);
    
    Class<?> proxyClass = generator.generate();
    
    return proxyClass.getConstructors()[0];
  }
621654
private <T> Instantiator<T> getByDefaultConstructor(TypeToken<T> type) {
    try {
      final Constructor<? super T> defaultCons = type.getRawType().getDeclaredConstructor();
      defaultCons.setAccessible(true);

      return new Instantiator<T>() {
        @Override
        public T create() {
          try {
            return (T) defaultCons.newInstance();
          } catch (Exception e) {
            throw Throwables.propagate(e);
          }
        }
      };

    } catch (NoSuchMethodException e) {
      return null;
    }
  }
937266
@Override
    public Constructor<T> getConstructor() {
        if (this.constructor == null) {
            try {
                this.constructor = this.managedClass.getConstructor((Class<?>[]) null);
            } catch (NoSuchMethodException e) {
                throw new IllegalStateException(e);
            }
        }
        return this.constructor;
    }
423566
function extendClass(source){
      var proto = this.prototype;

      if (typeof source == 'function' && !isClass(source))
        source = source(this.superClass_.prototype, slice(proto));

      if (source.prototype)
        source = source.prototype;

      for (var key in source)
      {
        var value = source[key];
        var protoValue = proto[key];

        if (key == 'className' || key == 'extendConstructor_')
          this[key] = value;
        else
        {
          if (protoValue && protoValue.__extend__)
            proto[key] = protoValue.__extend__(value);
          else
          {
            proto[key] = value;
            ///** @cut */ if (value && !value.__extend__ && (value.constructor == Object || value.constructor == Array)){ consoleMethods.warn('!' + key); }
          }
        }
      }

      // for browsers that doesn't enum toString
      if (TOSTRING_BUG && source[key = 'toString'] !== toString)
        proto[key] = source[key];

      return this;
    }
349763
function construct(constructor) {
            // Create constructor
            var c = function () {
                return constructor.apply(this);
            };
            // Assign prototype
            c.prototype = constructor.prototype;
            // Create new instance
            return service_factory_1.ServiceFactory.export(c, name, context);
        }
598892
public static <T> Constructor<T> getConstructor(Class<T> instantiable, Class<?>... constructorParameterTypes)
    {
        try
        {
            return instantiable.getConstructor(constructorParameterTypes);
        }
        catch (NoSuchMethodException ignored)
        {
            return ReflectionHelper.searchForConstructor(instantiable, constructorParameterTypes);
        }
    }
1096848
protected Constructor getConstructor(Class type) {
        try {
            return type.getConstructor(String.class);
        }
        catch (NoSuchMethodException e) {
            throw new RuntimeException(
                    "Unable to find a constructor that accepts"
                    + " a single String argument in the "
                    + type.getName() + " class.", e);
        }
    }
1193261
function inherit() {
    var args = arguments,
        withMixins = isArray(args[0]),
        hasBase = withMixins || isFunction(args[0]),
        base = hasBase? withMixins? applyMixins(args[0]) : args[0] : emptyBase,
        props = args[hasBase? 1 : 0] || {},
        staticProps = args[hasBase? 2 : 1],
        res = props.__constructor || (hasBase && base.prototype.__constructor)?
            function() {
                return this.__constructor.apply(this, arguments);
            } :
            hasBase?
                function() {
                    return base.apply(this, arguments);
                } :
                function() {};

    if(!hasBase) {
        res.prototype = props;
        res.prototype.__self = res.prototype.constructor = res;
        return extend(res, staticProps);
    }

    extend(res, base);

    res.__parent = base;

    var basePtp = base.prototype,
        resPtp = res.prototype = objCreate(basePtp);

    resPtp.__self = resPtp.constructor = res;

    props && override(basePtp, resPtp, props);
    staticProps && override(base, res, staticProps);

    return res;
}
174227
public static <T> Constructor<T> bestConstructor(Constructor<T>[] constructors, Class<?>[] argTypes) throws AmbiguousConstructorMatchException {
        try {
            return best(constructors, collectSignatures(constructors), collectVarArgs(constructors), argTypes);
        } catch (AmbiguousSignatureMatchException e) {
            throw new AmbiguousConstructorMatchException(e, constructors);
        }
    }
539319
@SuppressWarnings("unchecked")
    private <T extends Assignable> Constructor<T> findConstructor(Class<T> extensionImplClass) {
        Constructor<?>[] constructors = SecurityActions.getConstructors(extensionImplClass);
        for (Constructor<?> constructor : constructors) {
            Class<?>[] parameters = constructor.getParameterTypes();
            if (parameters.length != 1) {
                continue;
            }
            Class<?> parameter = parameters[0];
            if (Archive.class.isAssignableFrom(parameter)) {
                return (Constructor<T>) constructor;
            }
        }
        throw new ExtensionLoadingException("No constructor with a single argument of type " + Archive.class.getName()
            + " could be found");
    }
186732
function extendClass(parent, constructor)
	{
		var anonymous = function() {};
		anonymous.prototype = parent.prototype;
		constructor.prototype = new anonymous();
		constructor.constructor = constructor;

		defineProperties.apply(null, [constructor.prototype, { configurable: false }].concat(Array.prototype.slice.call(arguments, 2)));

		defineProperties(constructor, { configurable: false }, {
			extend: partial(extendClass, constructor)
		});

		return constructor;
	}
1150041
@SuppressWarnings("unchecked")
    public static <T> Constructor<T> findMatchingConstructor(Class<T> classToInspect, Object... params) {
        Constructor<T> checkedConstructors = null;
        for (Constructor<?> constructor : classToInspect.getDeclaredConstructors()) {
            Type[] parameterTypes = constructor.getParameterTypes();
            if (parameterTypes.length == params.length && checkParameterTypes(parameterTypes, params)) {
                if (checkedConstructors == null) {
                    checkedConstructors = (Constructor<T>) constructor;
                } else {
                    throw BusinessException.createNew(BusinessErrorCode.AMBIGUOUS_CONSTRUCTOR_FOUND)
                            .put("constructor1", constructor)
                            .put("constructor2", checkedConstructors)
                            .put("object", classToInspect.getSimpleName())
                            .put("parameters", params);
                }
            }
        }
        return checkedConstructors;
    }
1014872
function(Superclass, constructorFunction) {
    var instance = makeType(constructorFunction);
    instance.prototype = new Superclass();
    instance.prototype.constructor = constructorFunction;

    return instance;
  }
253757
function _gpfClassSuperCreate (superMember) {
    var superMethod;
    if (typeof superMember === "function") {
        superMethod = superMember;
    } else {
        superMethod = _gpfClassNoSuper;
    }
    return _gpfClassSuperCreateWithSameSignature(superMethod);
}
816691
public ASTConstructor getConstructor(Constructor constructor, boolean isEnum, boolean isInnerClass) {
        ASTAccessModifier modifier = ASTAccessModifier.getModifier(constructor.getModifiers());

        Annotation[][] parameterAnnotations = constructor.getParameterAnnotations();

        if(constructor.getDeclaringClass().getEnclosingClass() != null && !Modifier.isStatic(constructor.getDeclaringClass().getModifiers())){
            // An inner class constructor contains a hidden non-annotated prameter
            Annotation[][] paddedParameterAnnotations = new Annotation[parameterAnnotations.length + 1][];

            paddedParameterAnnotations[0] = new Annotation[0];
            System.arraycopy(parameterAnnotations, 0, paddedParameterAnnotations, 1, parameterAnnotations.length);

            parameterAnnotations = paddedParameterAnnotations;
        }

        ImmutableList<ASTParameter> constructorParameters = getParameters(constructor.getParameterTypes(), constructor.getGenericParameterTypes(), parameterAnnotations);
        if(isEnum) {
            constructorParameters = constructorParameters.subList(2, constructorParameters.size());
        }
        if(isInnerClass){
            constructorParameters = constructorParameters.subList(1, constructorParameters.size());
        }
        ImmutableSet<ASTType> throwsTypes = getTypes(constructor.getExceptionTypes());

        return new ASTClassConstructor(getAnnotations(constructor), constructor, constructorParameters, modifier, throwsTypes);
    }
817513
public static <T> T instance(Class<T> superClass) {
		// check overriden map first
		if (map.get(superClass) != null) {
			return (T) JK.newInstance(map.get(superClass));
		}
		try {
			return (T) context.getBean(superClass);
		} catch (NoSuchBeanDefinitionException ex) {
			// no bean difinition is there, so lets try to see of the class is already
			// concrete and
			// can be qualified to be returned
			if (!Modifier.isAbstract(superClass.getModifiers())) {
				return JK.newInstance(superClass.getName());
			} else {
				throw ex;
			}
		} catch (RuntimeException e) {
			dumpBeansNames();
			throw e;
		}
	}