/** * Resolve a constructor * * @param trace whether trace is enabled * @param info the bean info * @param metaData the constructor metadata * @return the constructor info */ public static ConstructorInfo resolveConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData) { if (info == null) throw new IllegalArgumentException("Null bean info"); List<ParameterMetaData> params = Collections.emptyList(); if (metaData != null && metaData.getParameters() != null) params = metaData.getParameters(); String[] paramTypes = new String[params.size()]; if (params.isEmpty() == false) { int x = 0; for (Iterator<ParameterMetaData> i = params.iterator(); i.hasNext();) { ParameterMetaData pdata = i.next(); paramTypes[x++] = pdata.getType(); } } return findConstructorInfo(info.getClassInfo(), paramTypes); }
ConstructorInfo ci = Configurator.findConstructorInfo(beanInfo.getClassInfo(), paramTypes); return applyCollectionOrMapCheck(ci.getParameterTypes()[parameter.getIndex()]);