greediestConstructor = sortedMatchingConstructor;
lastSatisfiableConstructorSize = parameterTypes.length;
}
}
if (!conflicts.isEmpty()) {
throw new PicoCompositionException(conflicts.size() + " satisfiable constructors is too many for '"+getComponentImplementation()+"'. Constructor List:" + conflicts.toString().replace(getComponentImplementation().getName(),"<init>").replace("public <i","<i"));
} else if (greediestConstructor == null && !unsatisfiableDependencyTypes.isEmpty()) {
throw new UnsatisfiableDependenciesException(this, unsatisfiedDependencyType, unsatisfiableDependencyTypes, container);
} else if (greediestConstructor == null) {
// be nice to the user, show all constructors that were filtered out
final Set<Constructor> nonMatching = new HashSet<Constructor>();
for (Constructor constructor : getConstructors()) {
nonMatching.add(constructor);
}
throw new PicoCompositionException("Either the specified parameters do not match any of the following constructors: " + nonMatching.toString() + "; OR the constructors were not accessible for '" + getComponentImplementation().getName() + "'");
}
return greediestConstructor;
}