private <T> ConstructorInjector<T> createConstructor(TypeLiteral<T> type, Errors errors)
throws ErrorsException {
int numErrorsBefore = errors.size();
InjectionPoint injectionPoint;
try {
injectionPoint = InjectionPoint.forConstructorOf(type);
} catch (ConfigurationException e) {
errors.merge(e.getErrorMessages());
throw errors.toException();
}
SingleParameterInjector<?>[] constructorParameterInjectors
= injector.getParametersInjectors(injectionPoint.getDependencies(), errors);
MembersInjectorImpl<T> membersInjector = injector.membersInjectorStore.get(type, errors);
ConstructionProxyFactory<T> factory = new DefaultConstructionProxyFactory<T>(injectionPoint);
errors.throwIfNewErrors(numErrorsBefore);